diff --git a/.github/scripts/export-ascend/generate_paraformer.py b/.github/scripts/export-ascend/generate_paraformer.py index fa22d64b9d..396460bf67 100755 --- a/.github/scripts/export-ascend/generate_paraformer.py +++ b/.github/scripts/export-ascend/generate_paraformer.py @@ -5,7 +5,7 @@ import json from dataclasses import asdict, dataclass -from generate_zipformer_ctc_20250703 import get_image +from generate_zipformer_ctc_20250703 import get_cann_version, get_image, get_soc_version @dataclass @@ -26,8 +26,8 @@ def __post_init__(self): def main(): - cann_version = ["7.0", "8.0", "8.2"] - soc_version = ["910B", "910B2", "910B3", "310P3"] + cann_version = get_cann_version() + soc_version = get_soc_version() framework_list = ["FunASR", "WSChuan-ASR"] configs = [ diff --git a/.github/scripts/export-ascend/generate_sense_voice.py b/.github/scripts/export-ascend/generate_sense_voice.py index f1ecbf39b4..6c54a0a4d1 100755 --- a/.github/scripts/export-ascend/generate_sense_voice.py +++ b/.github/scripts/export-ascend/generate_sense_voice.py @@ -5,7 +5,7 @@ import json from dataclasses import asdict, dataclass -from generate_zipformer_ctc_20250703 import get_image +from generate_zipformer_ctc_20250703 import get_image, get_soc_version, get_cann_version @dataclass @@ -26,8 +26,8 @@ def __post_init__(self): def main(): - cann_version = ["7.0", "8.0", "8.2"] - soc_version = ["910B", "910B2", "910B3", "310P3"] + cann_version = get_cann_version() + soc_version = get_soc_version() framework_list = ["FunASR", "WSYue-ASR"] configs = [ diff --git a/.github/scripts/export-ascend/generate_zipformer_ctc_20250703.py b/.github/scripts/export-ascend/generate_zipformer_ctc_20250703.py index 511bfee1e9..f1865d5d81 100755 --- a/.github/scripts/export-ascend/generate_zipformer_ctc_20250703.py +++ b/.github/scripts/export-ascend/generate_zipformer_ctc_20250703.py @@ -32,6 +32,16 @@ def get_image(cann: str, soc_version: str): raise ValueError(f"Unsupported soc_version {soc_version}") +def get_soc_version(): + soc_version = ["910B", "910B2", "910B3", "910B4", "310P3"] + return soc_version + + +def get_cann_version(): + cann_version = ["7.0", "8.0", "8.2"] + return cann_version + + @dataclass class Config: # 7.0, 8.0, 8.2 @@ -49,8 +59,8 @@ def __post_init__(self): def main(): - cann_version = ["7.0", "8.0", "8.2"] - soc_version = ["910B", "910B2", "910B3", "310P3"] + cann_version = get_cann_version() + soc_version = get_soc_version() input_in_seconds = ["5", "8", "10", "13", "15", "18", "20", "23", "25", "28", "30"] configs = [ diff --git a/.github/workflows/export-paraformer-to-ascend-npu.yaml b/.github/workflows/export-paraformer-to-ascend-npu.yaml index 6358719444..9b8d62fc3f 100644 --- a/.github/workflows/export-paraformer-to-ascend-npu.yaml +++ b/.github/workflows/export-paraformer-to-ascend-npu.yaml @@ -3,7 +3,7 @@ name: export-paraformer-to-ascend-npu on: push: branches: - - refactor-ascend-export-script + - ascend-910b4-2 workflow_dispatch: concurrency: @@ -26,8 +26,8 @@ jobs: id: set-matrix run: | # outputting for debugging purposes - python3 .github/scripts/export-ascend/generate_sense_voice.py - MATRIX=$(python3 .github/scripts/export-ascend/generate_sense_voice.py) + python3 .github/scripts/export-ascend/generate_paraformer.py + MATRIX=$(python3 .github/scripts/export-ascend/generate_paraformer.py) # deprecated # echo "::set-output name=matrix::${MATRIX}" @@ -75,6 +75,9 @@ jobs: source /usr/local/Ascend/ascend-toolkit/set_env.sh export LD_LIBRARY_PATH=/usr/local/Ascend/ascend-toolkit/latest/x86_64-linux/devlib/linux/x86_64:$LD_LIBRARY_PATH + # for cann 7.0.0 + export LD_LIBRARY_PATH=/usr/local/Ascend/ascend-toolkit/latest/x86_64-linux/devlib/x86_64:$LD_LIBRARY_PATH + echo "CANN environment:" which atc || echo "atc not found" atc --help @@ -129,6 +132,9 @@ jobs: source /usr/local/Ascend/ascend-toolkit/set_env.sh export LD_LIBRARY_PATH=/usr/local/Ascend/ascend-toolkit/latest/x86_64-linux/devlib/linux/x86_64:$LD_LIBRARY_PATH + # for cann 7.0.0 + export LD_LIBRARY_PATH=/usr/local/Ascend/ascend-toolkit/latest/x86_64-linux/devlib/x86_64:$LD_LIBRARY_PATH + soc_version=${{ matrix.soc_version }} cann=${{ matrix.cann }} @@ -222,6 +228,9 @@ jobs: source /usr/local/Ascend/ascend-toolkit/set_env.sh export LD_LIBRARY_PATH=/usr/local/Ascend/ascend-toolkit/latest/x86_64-linux/devlib/linux/x86_64:$LD_LIBRARY_PATH + # for cann 7.0.0 + export LD_LIBRARY_PATH=/usr/local/Ascend/ascend-toolkit/latest/x86_64-linux/devlib/x86_64:$LD_LIBRARY_PATH + soc_version=${{ matrix.soc_version }} cann=${{ matrix.cann }} diff --git a/.github/workflows/export-sense-voice-to-ascend-npu.yaml b/.github/workflows/export-sense-voice-to-ascend-npu.yaml index 0be4e277c0..efc8786146 100644 --- a/.github/workflows/export-sense-voice-to-ascend-npu.yaml +++ b/.github/workflows/export-sense-voice-to-ascend-npu.yaml @@ -3,7 +3,7 @@ name: export-sense-voice-to-ascend-npu on: push: branches: - - refactor-ascend-export-script + - ascend-910b4-2 workflow_dispatch: concurrency: diff --git a/.github/workflows/export-zipformer-ctc-to-ascend-20250703.yaml b/.github/workflows/export-zipformer-ctc-to-ascend-20250703.yaml index 4169f7c016..af517075ef 100644 --- a/.github/workflows/export-zipformer-ctc-to-ascend-20250703.yaml +++ b/.github/workflows/export-zipformer-ctc-to-ascend-20250703.yaml @@ -3,7 +3,7 @@ name: export-zipformer-ctc-to-ascend-npu-20250703 on: push: branches: - - export-zipformer-ctc-ascend + - ascend-910b4-2 workflow_dispatch: concurrency: