File tree Expand file tree Collapse file tree 2 files changed +5
-2
lines changed
Expand file tree Collapse file tree 2 files changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -37,7 +37,10 @@ target_link_libraries(xfastertransformer
3737add_dependencies (xfastertransformer_static ${DEPEND_LIST} )
3838add_dependencies (xfastertransformer ${DEPEND_LIST} )
3939
40- execute_process (COMMAND python -m pip show torch
40+ find_package (Python COMPONENTS Interpreter Development)
41+ message (STATUS "Using python: ${Python_EXECUTABLE} " )
42+
43+ execute_process (COMMAND ${Python_EXECUTABLE} -m pip show torch
4144 RESULT_VARIABLE EXIT_CODE
4245 OUTPUT_QUIET )
4346if (${EXIT_CODE} EQUAL 0)
Original file line number Diff line number Diff line change @@ -18,7 +18,7 @@ find_package(OpenMP REQUIRED)
1818find_package (MPI REQUIRED)
1919find_package (oneCCL REQUIRED)
2020
21- execute_process (COMMAND python -c "import torch.utils; print(torch.utils.cmake_prefix_path)"
21+ execute_process (COMMAND ${Python_EXECUTABLE} -c "import torch.utils; print(torch.utils.cmake_prefix_path)"
2222 OUTPUT_VARIABLE TORCH_CMAKE_PREFIX_PATH
2323 OUTPUT_STRIP_TRAILING_WHITESPACE)
2424
You can’t perform that action at this time.
0 commit comments