File tree 2 files changed +5
-5
lines changed
2 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -79,19 +79,19 @@ function(generate_bindings_for_kernels)
79
79
execute_process (
80
80
COMMAND
81
81
"${PYTHON_EXECUTABLE} " -c
82
- "from distutils.sysconfig import get_python_lib ;print(get_python_lib() )"
82
+ "from importlib.util import find_spec ;print(find_spec('torchgen').submodule_search_locations[0] )"
83
83
OUTPUT_VARIABLE site-packages-out
84
84
ERROR_VARIABLE site-packages-out-error
85
85
RESULT_VARIABLE site-packages-result
86
86
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
87
87
OUTPUT_STRIP_TRAILING_WHITESPACE
88
88
)
89
- file (GLOB_RECURSE _torchgen_srcs "${site-packages-out}/torchgen/ *.py" )
89
+ file (GLOB_RECURSE _torchgen_srcs "${site-packages-out}/*.py" )
90
90
set (_gen_command
91
91
"${PYTHON_EXECUTABLE} " -m torchgen.gen_executorch
92
92
--source -path =${EXECUTORCH_ROOT} /codegen --install -dir=${_out_dir}
93
- --tags-path =${site-packages-out}/torchgen/ packaged/ATen/native/tags.yaml
94
- --aten-yaml-path =${site-packages-out}/torchgen/ packaged/ATen/native/native_functions.yaml
93
+ --tags-path =${site-packages-out}/packaged/ATen/native/tags.yaml
94
+ --aten-yaml-path =${site-packages-out}/packaged/ATen/native/native_functions.yaml
95
95
--op-selection-yaml-path =${_oplist_yaml}
96
96
)
97
97
You can’t perform that action at this time.
0 commit comments