File tree Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Original file line number Diff line number Diff line change @@ -162,6 +162,11 @@ set(PT_LIBS
162162 "libjpeg.so.62"
163163)
164164
165+ if ($ENV{CUDA_VERSION} VERSION_GREATER_EQUAL "13.0.2.006" )
166+ list (APPEND PT_LIBS "libtorch_nvshmem.so" )
167+ set (NVSHMEM_LIB "libtorch_nvshmem.so" )
168+ endif ()
169+
165170if (${TRITON_PYTORCH_ENABLE_TORCHVISION} )
166171 set (PT_LIBS
167172 ${PT_LIBS}
@@ -238,6 +243,7 @@ if (${TRITON_PYTORCH_DOCKER_BUILD})
238243 COMMAND docker cp pytorch_backend_ptlib:${PY_INSTALL_PATH} /torch/lib/libtorch_cuda_linalg.so libtorch_cuda_linalg.so
239244 COMMAND docker cp pytorch_backend_ptlib:${PY_INSTALL_PATH} /torch/lib/libtorch_global_deps.so libtorch_global_deps.so
240245 COMMAND docker cp pytorch_backend_ptlib:${PY_INSTALL_PATH} /torch/lib/libcaffe2_nvrtc.so libcaffe2_nvrtc.so
246+ COMMAND test -n "${NVSHMEM_LIB} " && docker cp pytorch_backend_ptlib:${PY_INSTALL_PATH} /torch/lib/libtorch_nvshmem.so libtorch_nvshmem.so
241247 COMMAND /bin/sh -c "if [ ${TRITON_PYTORCH_ENABLE_TORCHVISION} = 'ON' ]; then if [ ${RHEL_BUILD} = 'ON' ]; then docker cp -a -L pytorch_backend_ptlib:/usr/local/lib64/libtorchvision.so libtorchvision.so; else docker cp -a -L pytorch_backend_ptlib:/usr/local/${LIB_DIR} /libtorchvision.so.1 libtorchvision.so.1; fi; fi"
242248 COMMAND /bin/sh -c "if [ ${TRITON_PYTORCH_ENABLE_TORCHVISION} = 'ON' ]; then docker cp pytorch_backend_ptlib:/opt/pytorch/vision/torchvision/csrc include/torchvision/torchvision; fi"
243249 COMMAND /bin/sh -c "if [ ${TRITON_PYTORCH_ENABLE_TORCHTRT} = 'ON' ]; then docker cp pytorch_backend_ptlib:/usr/local/lib/python3.12/dist-packages/torch_tensorrt/lib/libtorchtrt_runtime.so libtorchtrt_runtime.so; fi"
You can’t perform that action at this time.
0 commit comments