@@ -3,7 +3,7 @@ name: export-paraformer-to-ascend-npu
33on :
44 push :
55 branches :
6- - ascend-npu
6+ - ascend-npu-310
77 workflow_dispatch :
88
99concurrency :
@@ -13,32 +13,53 @@ concurrency:
1313jobs :
1414 export-paraformer-to-rknn :
1515 if : github.repository_owner == 'k2-fsa' || github.repository_owner == 'csukuangfj'
16- name : ${{ matrix.framework }}
17- runs-on : ${{ matrix.os }}
16+ name : ${{ matrix.framework }} ${{ matrix.soc_version }}
17+ runs-on : ubuntu-latest
18+
19+ strategy :
20+ fail-fast : false
21+ matrix :
22+ include :
23+ # ===== Ascend 910B =====
24+ - soc_version : " 910B"
25+ image : " gpustack/ascendai-cann:8.0.RC3-910b-ubuntu20.04-py3.9"
26+ framework : " FunASR"
27+
28+ - soc_version : " 910B"
29+ image : " gpustack/ascendai-cann:8.0.RC3-910b-ubuntu20.04-py3.9"
30+ framework : " WSChuan-ASR"
31+
32+ # ===== Ascend 310 =====
33+ - soc_version : " 310P3"
34+ # image: "gpustack/ascendai-cann:8.0.RC2.alpha003-310p-ubuntu20.04-py3.9"
35+ image : " gpustack/devel-ascendai-cann:8.0.rc3.beta1-310p-ubuntu20.04-v2"
36+ framework : " FunASR"
37+
38+ - soc_version : " 310P3"
39+ # image: "gpustack/ascendai-cann:8.0.RC2.alpha003-310p-ubuntu20.04-py3.9"
40+ image : " gpustack/devel-ascendai-cann:8.0.rc3.beta1-310p-ubuntu20.04-v2"
41+ framework : " WSChuan-ASR"
42+
1843 container :
1944 # image: ascendai/cann:latest
2045 # image: ascendai/cann:8.1.rc1-910b-ubuntu22.04-py3.10
2146 # see https://hub.docker.com/r/gpustack/ascendai-cann/tags?name=8.0
22- image : gpustack/ascendai-cann:8.0.RC3-910b-ubuntu20.04-py3.9
23- strategy :
24- fail-fast : false
25- matrix :
26- os : [ubuntu-latest]
27- python-version : ["3.8"]
28- framework : ["FunASR", "WSChuan-ASR"]
47+ # see https://hub.docker.com/r/gpustack/devel-ascendai-cann/tags?name=310p
48+ image : ${{ matrix.image }}
2949
3050 steps :
3151 - uses : actions/checkout@v4
3252
33- - name : Setup Python ${{ matrix.python-version }}
53+ - name : Setup Python 3.8
3454 uses : actions/setup-python@v5
3555 with :
36- python-version : ${{ matrix.python-version }}
56+ python-version : " 3.8 "
3757
3858 - name : Show Python
3959 shell : bash
4060 run : |
4161 python3 --version
62+ which python3
4263
4364 - name : Install curl
4465 shell : bash
@@ -109,14 +130,16 @@ jobs:
109130 source /usr/local/Ascend/ascend-toolkit/set_env.sh
110131 export LD_LIBRARY_PATH=/usr/local/Ascend/ascend-toolkit/latest/x86_64-linux/devlib/linux/x86_64:$LD_LIBRARY_PATH
111132
133+ soc_version=${{ matrix.soc_version }}
134+
112135 atc --model=./predictor.onnx \
113136 --framework=5 \
114137 --host_env_os=linux \
115138 --host_env_cpu=aarch64 \
116139 --output=predictor \
117140 --input_format=ND \
118141 --input_shape="encoder_out:1,-1,512" \
119- --soc_version="Ascend910B "
142+ --soc_version="Ascend${soc_version} "
120143
121144 ls -lh *.om
122145
@@ -127,7 +150,7 @@ jobs:
127150 --output=decoder \
128151 --input_format=ND \
129152 --input_shape="encoder_out:1,-1,512;acoustic_embedding:1,-1,512" \
130- --soc_version="Ascend910B "
153+ --soc_version="Ascend${soc_version} "
131154
132155 ls -lh *.om
133156
@@ -138,7 +161,7 @@ jobs:
138161 --output=encoder \
139162 --input_format=ND \
140163 --input_shape="x:1,-1,560" \
141- --soc_version="Ascend910B "
164+ --soc_version="Ascend${soc_version} "
142165
143166 ls -lh *.om
144167
@@ -199,14 +222,16 @@ jobs:
199222 source /usr/local/Ascend/ascend-toolkit/set_env.sh
200223 export LD_LIBRARY_PATH=/usr/local/Ascend/ascend-toolkit/latest/x86_64-linux/devlib/linux/x86_64:$LD_LIBRARY_PATH
201224
225+ soc_version=${{ matrix.soc_version }}
226+
202227 atc --model=./predictor.onnx \
203228 --framework=5 \
204229 --host_env_os=linux \
205230 --host_env_cpu=aarch64 \
206231 --output=predictor \
207232 --input_format=ND \
208233 --input_shape="encoder_out:1,-1,512" \
209- --soc_version="Ascend910B "
234+ --soc_version="Ascend${soc_version} "
210235
211236 ls -lh *.om
212237
@@ -217,7 +242,7 @@ jobs:
217242 --output=decoder \
218243 --input_format=ND \
219244 --input_shape="encoder_out:1,-1,512;acoustic_embedding:1,-1,512" \
220- --soc_version="Ascend910B "
245+ --soc_version="Ascend${soc_version} "
221246
222247 ls -lh *.om
223248
@@ -228,13 +253,13 @@ jobs:
228253 --output=encoder \
229254 --input_format=ND \
230255 --input_shape="x:1,-1,560" \
231- --soc_version="Ascend910B "
256+ --soc_version="Ascend${soc_version} "
232257
233258 ls -lh *.om
234259
235260
236261 echo "collect results"
237- d=sherpa-onnx-ascend-910B -paraformer-zh-2025-10-07
262+ d=sherpa-onnx-ascend-${soc_version} -paraformer-zh-2025-10-07
238263
239264 mkdir -p $d
240265 mkdir -p $d/test_wavs
0 commit comments