Skip to content

Commit 42a8fd4

Browse files
authored
Fix library paths on ARM-SBSA (#133)
* Add cusparseLt in the installation to support 24.06 * Fix the arm build * Fix the lib path
1 parent 305e07b commit 42a8fd4

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

CMakeLists.txt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,6 +160,7 @@ endif() # TRITON_PYTORCH_ENABLE_TORCHTRT
160160

161161
if (CMAKE_HOST_SYSTEM_PROCESSOR MATCHES "aarch64")
162162
set(LIBS_ARCH "aarch64")
163+
set(CUSPARSE_ARCH "sbsa")
163164
set(LIBTORCH_LIBS
164165
"libopenblas.so.0"
165166
"libnvpl_blas_core.so.0"
@@ -175,6 +176,7 @@ if (CMAKE_HOST_SYSTEM_PROCESSOR MATCHES "aarch64")
175176
)
176177
else()
177178
set(LIBS_ARCH "x86_64")
179+
set(CUSPARSE_ARCH "x86_64")
178180
set(LIBTORCH_LIBS
179181
"libmkl_avx2.so.1"
180182
"libmkl_avx512.so.1"
@@ -230,7 +232,7 @@ if (${TRITON_PYTORCH_DOCKER_BUILD})
230232
COMMAND docker cp pytorch_backend_ptlib:/usr/local/lib/python3.10/dist-packages/torch/lib/libtorch_global_deps.so libtorch_global_deps.so
231233
COMMAND docker cp pytorch_backend_ptlib:/usr/local/lib/python3.10/dist-packages/torch/lib/libcaffe2_nvrtc.so libcaffe2_nvrtc.so
232234
# TODO: Revisit when not needed by making it part of cuda base container.
233-
COMMAND docker cp -L pytorch_backend_ptlib:/usr/local/cuda-12.5/targets/${LIBS_ARCH}-linux/lib/libcusparseLt.so libcusparseLt.so
235+
COMMAND docker cp -L pytorch_backend_ptlib:/usr/local/cuda-12.5/targets/${CUSPARSE_ARCH}-linux/lib/libcusparseLt.so libcusparseLt.so
234236
COMMAND docker cp pytorch_backend_ptlib:/usr/local/lib/libtorchvision.so libtorchvision.so
235237
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"
236238
COMMAND docker cp pytorch_backend_ptlib:/usr/local/lib/python3.10/dist-packages/torch_tensorrt/bin/torchtrtc torchtrtc || echo "error ignored..." || true

0 commit comments

Comments
 (0)