Committed by
GitHub
Add onnxruntime 1.18.1 for Linux aarch64 GPU (#1914)
正在显示
4 个修改的文件
包含
25 行增加
和
2 行删除
| @@ -44,6 +44,9 @@ jobs: | @@ -44,6 +44,9 @@ jobs: | ||
| 44 | gpu: ON | 44 | gpu: ON |
| 45 | onnxruntime_version: "1.16.0" | 45 | onnxruntime_version: "1.16.0" |
| 46 | - os: ubuntu-22.04-arm | 46 | - os: ubuntu-22.04-arm |
| 47 | + gpu: ON | ||
| 48 | + onnxruntime_version: "1.18.1" | ||
| 49 | + - os: ubuntu-22.04-arm | ||
| 47 | gpu: OFF | 50 | gpu: OFF |
| 48 | onnxruntime_version: "" | 51 | onnxruntime_version: "" |
| 49 | 52 |
| @@ -46,7 +46,8 @@ option(SHERPA_ONNX_USE_PRE_INSTALLED_ONNXRUNTIME_IF_AVAILABLE "True to use pre-i | @@ -46,7 +46,8 @@ option(SHERPA_ONNX_USE_PRE_INSTALLED_ONNXRUNTIME_IF_AVAILABLE "True to use pre-i | ||
| 46 | option(SHERPA_ONNX_ENABLE_SANITIZER "Whether to enable ubsan and asan" OFF) | 46 | option(SHERPA_ONNX_ENABLE_SANITIZER "Whether to enable ubsan and asan" OFF) |
| 47 | option(SHERPA_ONNX_BUILD_C_API_EXAMPLES "Whether to enable C API examples" ON) | 47 | option(SHERPA_ONNX_BUILD_C_API_EXAMPLES "Whether to enable C API examples" ON) |
| 48 | 48 | ||
| 49 | -set(SHERPA_ONNX_LINUX_ARM64_GPU_ONNXRUNTIME_VERSION "1.11.0" CACHE STRING "Used only for Linux ARM64 GPU. If you use Jetson nano b01, then please set it to 1.11.0. If you use Jetson Orin NX, then set it to 1.16.0") | 49 | +set(SHERPA_ONNX_LINUX_ARM64_GPU_ONNXRUNTIME_VERSION "1.11.0" CACHE STRING "Used only for Linux ARM64 GPU. If you use Jetson nano b01, then please set it to 1.11.0. If you use Jetson Orin NX, then set it to 1.16.0.If you use NVIDIA Jetson Orin Nano Engineering Reference Developer Kit |
| 50 | +Super - Jetpack 6.2 [L4T 36.4.3], then set it to 1.18.1") | ||
| 50 | 51 | ||
| 51 | 52 | ||
| 52 | set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/lib") | 53 | set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/lib") |
| @@ -20,6 +20,14 @@ | @@ -20,6 +20,14 @@ | ||
| 20 | # export SHERPA_ONNX_ENABLE_GPU=ON | 20 | # export SHERPA_ONNX_ENABLE_GPU=ON |
| 21 | # export SHERPA_ONNX_LINUX_ARM64_GPU_ONNXRUNTIME_VERSION=1.16.0 | 21 | # export SHERPA_ONNX_LINUX_ARM64_GPU_ONNXRUNTIME_VERSION=1.16.0 |
| 22 | # ./build-aarch64-linux-gnu.sh | 22 | # ./build-aarch64-linux-gnu.sh |
| 23 | +# | ||
| 24 | +# (d) For NVIDIA Jetson Orin Nano Engineering Reference Developer Kit Super | ||
| 25 | +# Jetpack 6.2 [L4T 36.4.3] (CUDA 12.6) | ||
| 26 | +# | ||
| 27 | +# export SHERPA_ONNX_ENABLE_GPU=ON | ||
| 28 | +# export SHERPA_ONNX_LINUX_ARM64_GPU_ONNXRUNTIME_VERSION=1.18.1 | ||
| 29 | +# ./build-aarch64-linux-gnu.sh | ||
| 30 | + | ||
| 23 | 31 | ||
| 24 | if command -v aarch64-none-linux-gnu-gcc &> /dev/null; then | 32 | if command -v aarch64-none-linux-gnu-gcc &> /dev/null; then |
| 25 | ln -svf $(which aarch64-none-linux-gnu-gcc) ./aarch64-linux-gnu-gcc | 33 | ln -svf $(which aarch64-none-linux-gnu-gcc) ./aarch64-linux-gnu-gcc |
| @@ -27,6 +27,11 @@ to cmake (You need to make sure CUDA 10.2 is available on your board). | @@ -27,6 +27,11 @@ to cmake (You need to make sure CUDA 10.2 is available on your board). | ||
| 27 | If you use Jetson Orin NX, then please pass | 27 | If you use Jetson Orin NX, then please pass |
| 28 | -DSHERPA_ONNX_LINUX_ARM64_GPU_ONNXRUNTIME_VERSION=1.16.0 | 28 | -DSHERPA_ONNX_LINUX_ARM64_GPU_ONNXRUNTIME_VERSION=1.16.0 |
| 29 | to cmake (You need to make sure CUDA 11.4 is available on your board). | 29 | to cmake (You need to make sure CUDA 11.4 is available on your board). |
| 30 | + | ||
| 31 | +If you use NVIDIA Jetson Orin Nano Engineering Reference Developer Kit | ||
| 32 | +Super - Jetpack 6.2 [L4T 36.4.3], then please pass | ||
| 33 | + -DSHERPA_ONNX_LINUX_ARM64_GPU_ONNXRUNTIME_VERSION=1.18.1 | ||
| 34 | +to cmake (You need to make sure CUDA 12.6 is available on your board). | ||
| 30 | ") | 35 | ") |
| 31 | 36 | ||
| 32 | set(v ${SHERPA_ONNX_LINUX_ARM64_GPU_ONNXRUNTIME_VERSION}) | 37 | set(v ${SHERPA_ONNX_LINUX_ARM64_GPU_ONNXRUNTIME_VERSION}) |
| @@ -36,8 +41,14 @@ set(onnxruntime_URL2 "https://hf-mirror.com/csukuangfj/onnxruntime-libs/resolve/ | @@ -36,8 +41,14 @@ set(onnxruntime_URL2 "https://hf-mirror.com/csukuangfj/onnxruntime-libs/resolve/ | ||
| 36 | 41 | ||
| 37 | if(v STREQUAL "1.11.0") | 42 | if(v STREQUAL "1.11.0") |
| 38 | set(onnxruntime_HASH "SHA256=36eded935551e23aead09d4173bdf0bd1e7b01fdec15d77f97d6e34029aa60d7") | 43 | set(onnxruntime_HASH "SHA256=36eded935551e23aead09d4173bdf0bd1e7b01fdec15d77f97d6e34029aa60d7") |
| 39 | -else() | 44 | +elseif(v STREQUAL "1.16.0") |
| 40 | set(onnxruntime_HASH "SHA256=4c09d5acf2c2682b4eab1dc2f1ad98fc1fde5f5f1960063e337983ba59379a4b") | 45 | set(onnxruntime_HASH "SHA256=4c09d5acf2c2682b4eab1dc2f1ad98fc1fde5f5f1960063e337983ba59379a4b") |
| 46 | +elseif(v STREQUAL "1.18.1") | ||
| 47 | + set(onnxruntime_URL "https://github.com/csukuangfj/onnxruntime-libs/releases/download/v1.18.1/onnxruntime-linux-aarch64-gpu-cuda12-1.18.1.tar.bz2") | ||
| 48 | + set(onnxruntime_URL2 "https://hf-mirror.com/csukuangfj/onnxruntime-libs/resolve/main/onnxruntime-linux-aarch64-gpu-cuda12-1.18.1.tar.bz2") | ||
| 49 | + set(onnxruntime_HASH "SHA256=1e91064ec13a6fabb6b670da8a2da4f369c1dbd50a5be77a879b2473e7afc0a6") | ||
| 50 | +else() | ||
| 51 | + message(FATAL_ERROR "Unuspported onnxruntime version ${v} for Linux aarch64") | ||
| 41 | endif() | 52 | endif() |
| 42 | 53 | ||
| 43 | # If you don't have access to the Internet, | 54 | # If you don't have access to the Internet, |
-
请 注册 或 登录 后发表评论