Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Do not install Python runtime on non x86
Browse files Browse the repository at this point in the history
kthui committed Dec 9, 2023
1 parent f71dd17 commit b459f73
Showing 1 changed file with 12 additions and 8 deletions.
20 changes: 12 additions & 8 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -506,14 +506,18 @@ install(
)

if (${TRITON_PYTORCH_ENABLE_PYTHON_RUNTIME})
install(CODE "execute_process(COMMAND bash -c ${CMAKE_CURRENT_SOURCE_DIR}/tools/gen_pb_exec_env.sh)")
install(
FILES
src/model.py
${CMAKE_CURRENT_BINARY_DIR}/pb_exec_env_model.py.tar.gz
DESTINATION
${CMAKE_INSTALL_PREFIX}/backends/pytorch
)
if ((CMAKE_HOST_SYSTEM_PROCESSOR MATCHES "x86_64") OR (CMAKE_HOST_SYSTEM_PROCESSOR MATCHES "AMD64"))
install(CODE "execute_process(COMMAND bash -c ${CMAKE_CURRENT_SOURCE_DIR}/tools/gen_pb_exec_env.sh)")
install(
FILES
src/model.py
${CMAKE_CURRENT_BINARY_DIR}/pb_exec_env_model.py.tar.gz
DESTINATION
${CMAKE_INSTALL_PREFIX}/backends/pytorch
)
else()
message(WARNING "Skipped PyTorch Python runtime on unsupported architecture ${CMAKE_HOST_SYSTEM_PROCESSOR}")
endif()
endif() # TRITON_PYTORCH_ENABLE_PYTHON_RUNTIME

include(CMakePackageConfigHelpers)

0 comments on commit b459f73

Please sign in to comment.