Committed by
GitHub
Support cuda12 and cudnn8 for Linux aarch64. (#2021)
正在显示
4 个修改的文件
包含
27 行增加
和
3 行删除
| @@ -45,6 +45,9 @@ jobs: | @@ -45,6 +45,9 @@ jobs: | ||
| 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 | 47 | gpu: ON |
| 48 | + onnxruntime_version: "1.18.0" | ||
| 49 | + - os: ubuntu-22.04-arm | ||
| 50 | + gpu: ON | ||
| 48 | onnxruntime_version: "1.18.1" | 51 | onnxruntime_version: "1.18.1" |
| 49 | - os: ubuntu-22.04-arm | 52 | - os: ubuntu-22.04-arm |
| 50 | gpu: OFF | 53 | gpu: OFF |
| @@ -239,7 +242,7 @@ jobs: | @@ -239,7 +242,7 @@ jobs: | ||
| 239 | file: sherpa-onnx-*linux-aarch64*.tar.bz2 | 242 | file: sherpa-onnx-*linux-aarch64*.tar.bz2 |
| 240 | # repo_name: k2-fsa/sherpa-onnx | 243 | # repo_name: k2-fsa/sherpa-onnx |
| 241 | # repo_token: ${{ secrets.UPLOAD_GH_SHERPA_ONNX_TOKEN }} | 244 | # repo_token: ${{ secrets.UPLOAD_GH_SHERPA_ONNX_TOKEN }} |
| 242 | - # tag: v1.10.42 | 245 | + # tag: v1.11.1 |
| 243 | 246 | ||
| 244 | - name: Test offline Moonshine | 247 | - name: Test offline Moonshine |
| 245 | if: matrix.build_type != 'Debug' | 248 | if: matrix.build_type != 'Debug' |
| @@ -48,8 +48,7 @@ option(SHERPA_ONNX_ENABLE_SANITIZER "Whether to enable ubsan and asan" OFF) | @@ -48,8 +48,7 @@ option(SHERPA_ONNX_ENABLE_SANITIZER "Whether to enable ubsan and asan" OFF) | ||
| 48 | option(SHERPA_ONNX_BUILD_C_API_EXAMPLES "Whether to enable C API examples" ON) | 48 | option(SHERPA_ONNX_BUILD_C_API_EXAMPLES "Whether to enable C API examples" ON) |
| 49 | option(SHERPA_ONNX_ENABLE_RKNN "Whether to build for RKNN NPU " OFF) | 49 | option(SHERPA_ONNX_ENABLE_RKNN "Whether to build for RKNN NPU " OFF) |
| 50 | 50 | ||
| 51 | -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 | ||
| 52 | -Super - Jetpack 6.2 [L4T 36.4.3], then set it to 1.18.1") | 51 | +set(SHERPA_ONNX_LINUX_ARM64_GPU_ONNXRUNTIME_VERSION "1.11.0" CACHE STRING "Used only for Linux ARM64 GPU. Set to 1.11.0 if you use CUDA 10.2 and cudnn8. Set it to 1.16.0 if you use CUDA 11.4 and cudnn8. Set it to 1.18.0 if you use CUDA 12.2 and cudnn8. Set it to 1.18.1 if you use CUDA 12.6 and cudnn9") |
| 53 | 52 | ||
| 54 | 53 | ||
| 55 | set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/lib") | 54 | set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/lib") |
| @@ -27,6 +27,12 @@ | @@ -27,6 +27,12 @@ | ||
| 27 | # export SHERPA_ONNX_ENABLE_GPU=ON | 27 | # export SHERPA_ONNX_ENABLE_GPU=ON |
| 28 | # export SHERPA_ONNX_LINUX_ARM64_GPU_ONNXRUNTIME_VERSION=1.18.1 | 28 | # export SHERPA_ONNX_LINUX_ARM64_GPU_ONNXRUNTIME_VERSION=1.18.1 |
| 29 | # ./build-aarch64-linux-gnu.sh | 29 | # ./build-aarch64-linux-gnu.sh |
| 30 | +# | ||
| 31 | +# (e) For NVIDIA Jetson Orin NX (16GB ram) with CUDA 12.2, cudnn8 | ||
| 32 | +# | ||
| 33 | +# export SHERPA_ONNX_ENABLE_GPU=ON | ||
| 34 | +# export SHERPA_ONNX_LINUX_ARM64_GPU_ONNXRUNTIME_VERSION=1.18.0 | ||
| 35 | +# ./build-aarch64-linux-gnu.sh | ||
| 30 | 36 | ||
| 31 | 37 | ||
| 32 | if command -v aarch64-none-linux-gnu-gcc &> /dev/null; then | 38 | if command -v aarch64-none-linux-gnu-gcc &> /dev/null; then |
| @@ -43,6 +43,10 @@ if(v STREQUAL "1.11.0") | @@ -43,6 +43,10 @@ if(v STREQUAL "1.11.0") | ||
| 43 | set(onnxruntime_HASH "SHA256=36eded935551e23aead09d4173bdf0bd1e7b01fdec15d77f97d6e34029aa60d7") | 43 | set(onnxruntime_HASH "SHA256=36eded935551e23aead09d4173bdf0bd1e7b01fdec15d77f97d6e34029aa60d7") |
| 44 | elseif(v STREQUAL "1.16.0") | 44 | elseif(v STREQUAL "1.16.0") |
| 45 | set(onnxruntime_HASH "SHA256=4c09d5acf2c2682b4eab1dc2f1ad98fc1fde5f5f1960063e337983ba59379a4b") | 45 | set(onnxruntime_HASH "SHA256=4c09d5acf2c2682b4eab1dc2f1ad98fc1fde5f5f1960063e337983ba59379a4b") |
| 46 | +elseif(v STREQUAL "1.18.0") | ||
| 47 | + set(onnxruntime_URL "https://github.com/csukuangfj/onnxruntime-libs/releases/download/v1.18.0/onnxruntime-linux-aarch64-gpu-cuda12.2-cudnn8.9.4-trt8.6.2-1.18.0.tar.bz2") | ||
| 48 | + set(onnxruntime_URL2 "https://hf-mirror.com/csukuangfj/onnxruntime-libs/resolve/main/onnxruntime-linux-aarch64-gpu-cuda12.2-cudnn8.9.4-trt8.6.2-1.18.0.tar.bz2") | ||
| 49 | + set(onnxruntime_HASH "SHA256=da437a69be982fc28ca7d60d0c5ccce2f48d027fa888cc76458cdc05410f4e2d") | ||
| 46 | elseif(v STREQUAL "1.18.1") | 50 | 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") | 51 | 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") | 52 | set(onnxruntime_URL2 "https://hf-mirror.com/csukuangfj/onnxruntime-libs/resolve/main/onnxruntime-linux-aarch64-gpu-cuda12-1.18.1.tar.bz2") |
| @@ -60,6 +64,18 @@ set(possible_file_locations | @@ -60,6 +64,18 @@ set(possible_file_locations | ||
| 60 | ${CMAKE_BINARY_DIR}/onnxruntime-linux-aarch64-gpu-${v}.tar.bz2 | 64 | ${CMAKE_BINARY_DIR}/onnxruntime-linux-aarch64-gpu-${v}.tar.bz2 |
| 61 | /tmp/onnxruntime-linux-aarch64-gpu-${v}.tar.bz2 | 65 | /tmp/onnxruntime-linux-aarch64-gpu-${v}.tar.bz2 |
| 62 | /star-fj/fangjun/download/github/onnxruntime-linux-aarch64-gpu-${v}.tar.bz2 | 66 | /star-fj/fangjun/download/github/onnxruntime-linux-aarch64-gpu-${v}.tar.bz2 |
| 67 | + # | ||
| 68 | + $ENV{HOME}/Downloads/onnxruntime-linux-aarch64-gpu-cuda12.2-cudnn8.9.4-trt8.6.2-${v}.tar.bz2 | ||
| 69 | + ${CMAKE_SOURCE_DIR}/onnxruntime-linux-aarch64-gpu-cuda12.2-cudnn8.9.4-trt8.6.2-${v}.tar.bz2 | ||
| 70 | + ${CMAKE_BINARY_DIR}/onnxruntime-linux-aarch64-gpu-cuda12.2-cudnn8.9.4-trt8.6.2-${v}.tar.bz2 | ||
| 71 | + /tmp/onnxruntime-linux-aarch64-gpu-cuda12.2-cudnn8.9.4-trt8.6.2-${v}.tar.bz2 | ||
| 72 | + /star-fj/fangjun/download/github/onnxruntime-linux-aarch64-gpu-cuda12.2-cudnn8.9.4-trt8.6.2-${v}.tar.bz2 | ||
| 73 | + # | ||
| 74 | + $ENV{HOME}/Downloads/onnxruntime-linux-aarch64-gpu-cuda12-${v}.tar.bz2 | ||
| 75 | + ${CMAKE_SOURCE_DIR}/onnxruntime-linux-aarch64-gpu-cuda12-${v}.tar.bz2 | ||
| 76 | + ${CMAKE_BINARY_DIR}/onnxruntime-linux-aarch64-gpu-cuda12-${v}.tar.bz2 | ||
| 77 | + /tmp/onnxruntime-linux-aarch64-gpu-cuda12-${v}.tar.bz2 | ||
| 78 | + /star-fj/fangjun/download/github/onnxruntime-linux-aarch64-gpu-cuda12-${v}.tar.bz2 | ||
| 63 | ) | 79 | ) |
| 64 | 80 | ||
| 65 | foreach(f IN LISTS possible_file_locations) | 81 | foreach(f IN LISTS possible_file_locations) |
-
请 注册 或 登录 后发表评论