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