Skip to content

Commit

Permalink
Fix library paths on ARM-SBSA (#133)
Browse files Browse the repository at this point in the history
* Add cusparseLt in the installation to support 24.06

* Fix the arm build

* Fix the lib path
  • Loading branch information
tanmayv25 authored and mc-nv committed Jun 26, 2024
1 parent b157bbf commit cf8c195
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,7 @@ endif() # TRITON_PYTORCH_ENABLE_TORCHTRT

if (CMAKE_HOST_SYSTEM_PROCESSOR MATCHES "aarch64")
set(LIBS_ARCH "aarch64")
set(CUSPARSE_ARCH "sbsa")
set(LIBTORCH_LIBS
"libopenblas.so.0"
"libnvpl_blas_core.so.0"
Expand All @@ -175,6 +176,7 @@ if (CMAKE_HOST_SYSTEM_PROCESSOR MATCHES "aarch64")
)
else()
set(LIBS_ARCH "x86_64")
set(CUSPARSE_ARCH "x86_64")
set(LIBTORCH_LIBS
"libmkl_avx2.so.1"
"libmkl_avx512.so.1"
Expand Down Expand Up @@ -230,7 +232,7 @@ if (${TRITON_PYTORCH_DOCKER_BUILD})
COMMAND docker cp pytorch_backend_ptlib:/usr/local/lib/python3.10/dist-packages/torch/lib/libtorch_global_deps.so libtorch_global_deps.so
COMMAND docker cp pytorch_backend_ptlib:/usr/local/lib/python3.10/dist-packages/torch/lib/libcaffe2_nvrtc.so libcaffe2_nvrtc.so
# TODO: Revisit when not needed by making it part of cuda base container.
COMMAND docker cp -L pytorch_backend_ptlib:/usr/local/cuda-12.5/targets/${LIBS_ARCH}-linux/lib/libcusparseLt.so libcusparseLt.so
COMMAND docker cp -L pytorch_backend_ptlib:/usr/local/cuda-12.5/targets/${CUSPARSE_ARCH}-linux/lib/libcusparseLt.so libcusparseLt.so
COMMAND docker cp pytorch_backend_ptlib:/usr/local/lib/libtorchvision.so libtorchvision.so
COMMAND /bin/sh -c "if [ ${TRITON_PYTORCH_ENABLE_TORCHTRT} = 'ON' ]; then docker cp pytorch_backend_ptlib:/usr/local/lib/python3.10/dist-packages/torch_tensorrt/lib/libtorchtrt_runtime.so libtorchtrt_runtime.so; fi"
COMMAND docker cp pytorch_backend_ptlib:/usr/local/lib/python3.10/dist-packages/torch_tensorrt/bin/torchtrtc torchtrtc || echo "error ignored..." || true
Expand Down

0 comments on commit cf8c195

Please sign in to comment.