WeilJimmer Jay0515 commited on
Commit
fb2b924
·
0 Parent(s):

Duplicate from Jay0515/onnxruntime-gpu-aarch64-cuda13-sm121

Browse files

Co-authored-by: Hung <Jay0515@users.noreply.huggingface.co>

.gitattributes ADDED
@@ -0,0 +1,36 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ *.7z filter=lfs diff=lfs merge=lfs -text
2
+ *.arrow filter=lfs diff=lfs merge=lfs -text
3
+ *.bin filter=lfs diff=lfs merge=lfs -text
4
+ *.bz2 filter=lfs diff=lfs merge=lfs -text
5
+ *.ckpt filter=lfs diff=lfs merge=lfs -text
6
+ *.ftz filter=lfs diff=lfs merge=lfs -text
7
+ *.gz filter=lfs diff=lfs merge=lfs -text
8
+ *.h5 filter=lfs diff=lfs merge=lfs -text
9
+ *.joblib filter=lfs diff=lfs merge=lfs -text
10
+ *.lfs.* filter=lfs diff=lfs merge=lfs -text
11
+ *.mlmodel filter=lfs diff=lfs merge=lfs -text
12
+ *.model filter=lfs diff=lfs merge=lfs -text
13
+ *.msgpack filter=lfs diff=lfs merge=lfs -text
14
+ *.npy filter=lfs diff=lfs merge=lfs -text
15
+ *.npz filter=lfs diff=lfs merge=lfs -text
16
+ *.onnx filter=lfs diff=lfs merge=lfs -text
17
+ *.ot filter=lfs diff=lfs merge=lfs -text
18
+ *.parquet filter=lfs diff=lfs merge=lfs -text
19
+ *.pb filter=lfs diff=lfs merge=lfs -text
20
+ *.pickle filter=lfs diff=lfs merge=lfs -text
21
+ *.pkl filter=lfs diff=lfs merge=lfs -text
22
+ *.pt filter=lfs diff=lfs merge=lfs -text
23
+ *.pth filter=lfs diff=lfs merge=lfs -text
24
+ *.rar filter=lfs diff=lfs merge=lfs -text
25
+ *.safetensors filter=lfs diff=lfs merge=lfs -text
26
+ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
27
+ *.tar.* filter=lfs diff=lfs merge=lfs -text
28
+ *.tar filter=lfs diff=lfs merge=lfs -text
29
+ *.tflite filter=lfs diff=lfs merge=lfs -text
30
+ *.tgz filter=lfs diff=lfs merge=lfs -text
31
+ *.wasm filter=lfs diff=lfs merge=lfs -text
32
+ *.xz filter=lfs diff=lfs merge=lfs -text
33
+ *.zip filter=lfs diff=lfs merge=lfs -text
34
+ *.zst filter=lfs diff=lfs merge=lfs -text
35
+ *tfevents* filter=lfs diff=lfs merge=lfs -text
36
+ onnxruntime_gpu-1.25.0-cp312-cp312-linux_aarch64.whl filter=lfs diff=lfs merge=lfs -text
README.md ADDED
@@ -0,0 +1,128 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: mit
3
+ tags:
4
+ - onnxruntime
5
+ - gpu
6
+ - aarch64
7
+ - cuda13
8
+ - sm121
9
+ - blackwell
10
+ - dgx-spark
11
+ - jetson-thor
12
+ - prebuilt-wheel
13
+ language:
14
+ - zh
15
+ - en
16
+ library_name: onnxruntime
17
+ pipeline_tag: other
18
+ ---
19
+
20
+ # onnxruntime-gpu for aarch64 + CUDA 13 + SM121 (DGX Spark / Jetson Thor)
21
+
22
+ 針對 **NVIDIA DGX Spark (GB10 Blackwell)** 和 **Jetson Thor** 預先編譯的 `onnxruntime-gpu` wheel — 目前公開可取得的第一個適用於此平台的版本。
23
+
24
+ Pre-built `onnxruntime-gpu` wheel for **NVIDIA DGX Spark (GB10 Blackwell)** and **Jetson Thor** — the first publicly available wheel for this platform.
25
+
26
+ ## 為什麼需要這個 / Why This Exists
27
+
28
+ 截至 2026 年 3 月,官方 PyPI **沒有** aarch64 + CUDA 13 的 `onnxruntime-gpu` wheel,只提供 x86_64 版本。這個 wheel 是專門為 NVIDIA GB10 (SM121) Blackwell 架構從源碼編譯的。
29
+
30
+ As of March 2026, there is **no official `onnxruntime-gpu` wheel for aarch64 + CUDA 13** on PyPI (x86_64 only). This wheel was compiled from source specifically for the NVIDIA GB10 (SM121) Blackwell architecture.
31
+
32
+ ## 規格 / Specifications
33
+
34
+ | 項目 / Item | 值 / Value |
35
+ |-------------|-----------|
36
+ | **版本 / Version** | 1.25.0 (從 main branch 編譯) |
37
+ | **Python** | 3.12 (cp312) |
38
+ | **平台 / Platform** | linux_aarch64 |
39
+ | **CUDA** | 13.1 (向前相容 13.0 driver) |
40
+ | **cuDNN** | 9.17.1 |
41
+ | **CUDA Arch** | SM121 (Blackwell) |
42
+ | **Providers** | CUDAExecutionProvider, CPUExecutionProvider |
43
+
44
+ ## 安裝方式 / Installation
45
+
46
+ ```bash
47
+ pip install https://huggingface.co/Jay0515/onnxruntime-gpu-aarch64-cuda13-sm121/resolve/main/onnxruntime_gpu-1.25.0-cp312-cp312-linux_aarch64.whl
48
+ ```
49
+
50
+ ### cuDNN 需求 / cuDNN Requirement
51
+
52
+ 系統需要有 cuDNN 9.x。如果沒有系統級安裝,可以用 pip:
53
+
54
+ ```bash
55
+ pip install nvidia-cudnn-cu12
56
+ export LD_LIBRARY_PATH=$(python -c "import nvidia.cudnn; print(nvidia.cudnn.__path__[0])")/lib:$LD_LIBRARY_PATH
57
+ ```
58
+
59
+ ### 驗證 / Verify
60
+
61
+ ```python
62
+ import onnxruntime
63
+ print(onnxruntime.get_available_providers())
64
+ # 預期輸出 / Expected: ['CUDAExecutionProvider', 'CPUExecutionProvider']
65
+ ```
66
+
67
+ ## 編譯環境 / Build Environment
68
+
69
+ 在 NVIDIA 官方 PyTorch 容器內編譯(vllm-node,基於 nvcr.io/nvidia/pytorch:26.01-py3):
70
+
71
+ - CUDA 13.1, cuDNN 9.17.1, Python 3.12
72
+ - 所有 CUDA headers 和 libraries 已預裝
73
+
74
+ ## 編譯指令 / Build Command
75
+
76
+ ```bash
77
+ git clone --recursive --depth 1 https://github.com/microsoft/onnxruntime
78
+ cd onnxruntime
79
+
80
+ export CMAKE_BUILD_PARALLEL_LEVEL=4 # 限制並行數,避免 OOM
81
+
82
+ ./build.sh \
83
+ --config Release \
84
+ --build_shared_lib \
85
+ --parallel 4 \
86
+ --use_cuda \
87
+ --cuda_home /usr/local/cuda \
88
+ --cudnn_home /usr \
89
+ --cmake_extra_defines CMAKE_CUDA_ARCHITECTURES=121 \
90
+ --build_wheel \
91
+ --skip_tests \
92
+ --allow_running_as_root
93
+ ```
94
+
95
+ ### 重要注意事項 / Important Notes
96
+
97
+ - **務必使用 --parallel 4**(不要用 nproc)。CUDA kernel 編譯(尤其是 flash attention)會消耗超過 50GB RAM,在 128GB 統一記憶體的系統上使用全部核心會導致 OOM 凍結。
98
+ - 在 Docker 容器內編譯需加 **--allow_running_as_root**。
99
+ - **CMAKE_CUDA_ARCHITECTURES=121** 是支援 SM121 Blackwell 的關鍵參數。
100
+ - 編譯時間:GB10 上使用 4 個並行 job 約 45 分鐘。
101
+
102
+ ## 測試硬體 / Tested Hardware
103
+
104
+ - ASUS Ascent GX10 (NVIDIA GB10, 128GB LPDDR5x, aarch64)
105
+ - NVIDIA Driver 580.126.09, CUDA 13.0
106
+
107
+ ## 應用案例:Fun-ASR-Nano-GGUF + CUDA Encoder
108
+
109
+ 這個 wheel 的誕生是為了加速 [CapsWriter-Offline](https://github.com/HaujetZhao/CapsWriter-Offline) 的 Fun-ASR-Nano-GGUF 管線中的 ONNX encoder,在 DGX Spark 上實現 GPU 加速:
110
+
111
+ This wheel was built to accelerate the ONNX encoder in [CapsWriter-Offline](https://github.com/HaujetZhao/CapsWriter-Offline)'s Fun-ASR-Nano-GGUF pipeline on DGX Spark:
112
+
113
+ | 配置 / Configuration | 20 段音檔 / 20 audio segments | 加速比 / Speedup |
114
+ |----------------------|------------------------------|-----------------|
115
+ | PyTorch (FunASR) | 40.4s | 1.0x |
116
+ | ONNX+GGUF (CPU encoder) | 9.23s | 4.4x |
117
+ | **ONNX+GGUF (CUDA encoder)** | **5.75s** | **7.0x** |
118
+
119
+ ## 參考資料 / References
120
+
121
+ - [DGX Spark 編譯指南 / Build instructions](https://github.com/thewh1teagle/spark-docs/blob/main/BUILD_ONNXRUNTIME.md)
122
+ - [CapsWriter-Offline](https://github.com/HaujetZhao/CapsWriter-Offline)
123
+ - [onnxruntime GitHub Issue #27098: Jetson Thor CUDA 13](https://github.com/microsoft/onnxruntime/issues/27098)
124
+ - [onnxruntime GitHub Issue #27005: aarch64 GPU support](https://github.com/microsoft/onnxruntime/issues/27005)
125
+
126
+ ## 授權 / License
127
+
128
+ ONNX Runtime 採用 [MIT License](https://github.com/microsoft/onnxruntime/blob/main/LICENSE) 授權。
onnxruntime_gpu-1.25.0-cp312-cp312-linux_aarch64.whl ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:da487cc1ccd3aa11389efec14c6f0f8b6bd7ca6734423de3b528e578023cb200
3
+ size 56797759