Skip to content

Commit ffcbe0b

Browse files
authored
RHEL SBSA Build (#99)
* RHEL SBSA Build
1 parent 6c099b7 commit ffcbe0b

File tree

1 file changed

+14
-2
lines changed

1 file changed

+14
-2
lines changed

CMakeLists.txt

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,18 @@ endif()
5252
set(TRITON_TENSORRT_BACKEND_LIBNAME triton_tensorrt)
5353
set(TRITON_TENSORRT_BACKEND_INSTALLDIR ${CMAKE_INSTALL_PREFIX}/backends/tensorrt)
5454

55+
56+
if(LINUX)
57+
file(STRINGS "/etc/os-release" DISTRO_ID_LIKE REGEX "ID_LIKE")
58+
if(${DISTRO_ID_LIKE} MATCHES "rhel|centos")
59+
if(${CMAKE_SYSTEM_PROCESSOR} STREQUAL "aarch64")
60+
set(CMAKE_PREFIX_PATH ${CMAKE_PREFIX_PATH} "/usr/local/cuda/targets/sbsa-linux/lib")
61+
else()
62+
set(CMAKE_PREFIX_PATH ${CMAKE_PREFIX_PATH} "/usr/local/cuda/targets/x86_64-linux/lib")
63+
endif()
64+
endif(${DISTRO_ID_LIKE} MATCHES "rhel|centos")
65+
endif(LINUX)
66+
5567
#
5668
# Dependencies
5769
#
@@ -247,8 +259,8 @@ ENDFOREACH(p)
247259

248260
# NOTE: TRT 10 for Windows added the version suffix to the library names. See the release notes:
249261
# https://docs.nvidia.com/deeplearning/tensorrt/release-notes/index.html#tensorrt-10
250-
find_library(NVINFER_LIBRARY NAMES nvinfer nvinfer_10 PATHS "/usr/local/cuda/targets/x86_64-linux/lib")
251-
find_library(NVINFER_PLUGIN_LIBRARY NAMES nvinfer_plugin nvinfer_plugin_10 PATHS "/usr/local/cuda/targets/x86_64-linux/lib")
262+
find_library(NVINFER_LIBRARY NAMES nvinfer nvinfer_10)
263+
find_library(NVINFER_PLUGIN_LIBRARY NAMES nvinfer_plugin nvinfer_plugin_10)
252264
target_link_libraries(
253265
triton-tensorrt-backend
254266
PRIVATE

0 commit comments

Comments
 (0)