From 41b665011f41bd85d3a5d73c3d0f178583ac0847 Mon Sep 17 00:00:00 2001 From: Iswarya Alex Date: Wed, 29 Jul 2026 21:55:27 -0700 Subject: [PATCH 01/10] Add self hosted runner for amd npu --- .github/workflows/build-self-hosted.yml | 153 ++++++++++++++++++++++++ 1 file changed, 153 insertions(+) diff --git a/.github/workflows/build-self-hosted.yml b/.github/workflows/build-self-hosted.yml index 2286b63d6..f9e8715f1 100644 --- a/.github/workflows/build-self-hosted.yml +++ b/.github/workflows/build-self-hosted.yml @@ -114,3 +114,156 @@ jobs: run: | vulkaninfo --summary GG_BUILD_VULKAN=1 bash ./ci/run.sh ~/results/whisper.cpp ~/mnt/whisper.cpp + + amd-npu-windows: + runs-on: [self-hosted, Windows, stx, rai300_400] + timeout-minutes: 60 + continue-on-error: true # advisory while the runner pool is new; revisit later + + env: + FLEXML_URL: https://github.com/lemonade-sdk/whisper.cpp/releases/download/deps/flexmlrt1.7.0-win.zip + MODEL: base + + steps: + - name: Clone + uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6 + + - uses: microsoft/setup-msbuild@v2 + + - name: Install CMake if not available + shell: powershell + run: | + $installed = Get-Command cmake -ErrorAction SilentlyContinue + if (-not $installed) { + $ver = "3.28.1" + $url = "https://github.com/Kitware/CMake/releases/download/v$ver/cmake-$ver-windows-x86_64.msi" + Invoke-WebRequest -Uri $url -OutFile cmake.msi + Start-Process msiexec.exe -ArgumentList "/i cmake.msi /quiet /norestart" -Wait + $p = "C:\Program Files\CMake\bin" + $env:PATH = "$p;$env:PATH" + echo $p >> $env:GITHUB_PATH + cmake --version + if ($LASTEXITCODE -ne 0) { Write-Error "CMake install failed"; exit 1 } + } else { cmake --version } + + - name: Download FlexML runtime + shell: powershell + run: | + Invoke-WebRequest -Uri "${{ env.FLEXML_URL }}" -OutFile flexmlrt.zip + if (-Not (Test-Path "flexmlrt.zip")) { Write-Error "flexmlrt.zip not downloaded"; exit 1 } + if ((Get-Item "flexmlrt.zip").Length -eq 0) { Write-Error "flexmlrt.zip is empty"; exit 1 } + tar xf flexmlrt.zip + if ($LASTEXITCODE -ne 0) { Write-Error "Extraction failed"; exit 1 } + if (-not (Test-Path "flexmlrt")) { Write-Error "No flexmlrt directory after extraction"; exit 1 } + + - name: Setup FlexML, configure and build + shell: cmd + run: | + cd flexmlrt + call setup.bat + if errorlevel 1 ( echo ERROR: FlexML setup.bat failed & exit /b 1 ) + cd .. + cmake -B build -A x64 -DCMAKE_BUILD_TYPE=Release -DWHISPER_VITISAI=ON + if errorlevel 1 ( echo ERROR: CMake configure failed & exit /b 1 ) + cmake --build build --config Release -j + if errorlevel 1 ( echo ERROR: Build failed & exit /b 1 ) + + - name: Copy FlexML DLLs to build output + shell: powershell + run: | + foreach ($d in "flexmlrt/bin", "flexmlrt/lib") { + if (Test-Path "$d/*.dll") { Copy-Item "$d/*.dll" "build/bin/Release/" -Force } + } + if (-not (Test-Path "build/bin/Release/flexmlrt.dll")) { + Write-Error "flexmlrt.dll not staged next to binaries"; exit 1 + } + + - name: Download ggml model + shell: cmd + run: | + call models\download-ggml-model.cmd %MODEL% + if not exist models\ggml-%MODEL%.bin ( echo ERROR: model download failed & exit /b 1 ) + + - name: Download NPU encoder cache + shell: powershell + run: | + curl.exe -L --fail -o "models/ggml-$env:MODEL-encoder-vitisai.rai" ` + "https://huggingface.co/amd/whisper-$env:MODEL-onnx-npu/resolve/main/ggml-$env:MODEL-encoder-vitisai.rai" + $f = Get-Item "models/ggml-$env:MODEL-encoder-vitisai.rai" + Write-Host ".rai size: $([math]::Round($f.Length/1MB,2)) MB" + if ($f.Length -lt 1MB) { Write-Error ".rai suspiciously small - wrong URL or LFS pointer?"; exit 1 } + + - name: Run NPU smoke test + shell: cmd + run: | + build\bin\Release\whisper-cli.exe -m models\ggml-%MODEL%.bin -f samples\jfk.wav > vitisai.log 2>&1 + type vitisai.log + findstr /I /C:"vitisai" vitisai.log || ( echo ERROR: no VitisAI activity - encoder likely fell back to CPU & exit /b 1 ) + findstr /I /C:"ask not what your country" vitisai.log || ( echo ERROR: incorrect transcription & exit /b 1 ) + + - name: Upload smoke test log + if: always() + uses: actions/upload-artifact@v4 + with: + name: vitisai-smoke-log-windows + path: vitisai.log + + amd-npu-linux: + runs-on: [self-hosted, Linux, X64, stx, rai300-400] + timeout-minutes: 60 + continue-on-error: true # advisory while the runner pool is new; revisit later + + env: + FLEXML_LINUX_URL: # TODO: fill in Linux FlexML runtime URL + MODEL: base + + steps: + - name: Clone + uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6 + + - name: Install system deps + run: | + sudo apt-get update + sudo apt-get install -y build-essential cmake git \ + python3.12 python3.12-venv libboost-filesystem1.74.0 + + - name: Verify NPU device + run: | + lsmod | grep -q amdxdna || { echo "ERROR: amdxdna driver not loaded"; exit 1; } + ls /dev/accel/accel* || { echo "ERROR: no NPU accel device node"; exit 1; } + + - name: Download FlexML runtime (Linux) + run: | + curl -L --fail -o flexmlrt.tar.gz "$FLEXML_LINUX_URL" + tar xf flexmlrt.tar.gz + # TODO: add Linux FlexML environment setup (equivalent of Windows setup.bat) + echo "FlexmlRT_DIR=$PWD/flexmlrt/share/cmake/FlexmlRT" >> $GITHUB_ENV + echo "LD_LIBRARY_PATH=$PWD/flexmlrt/lib:$LD_LIBRARY_PATH" >> $GITHUB_ENV + + - name: Configure and build + run: | + cmake -B build -DCMAKE_BUILD_TYPE=Release -DWHISPER_VITISAI=ON + cmake --build build --config Release -j $(nproc) + + - name: Download ggml model + run: | + ./models/download-ggml-model.sh $MODEL + + - name: Download NPU encoder cache + run: | + curl -L --fail -o "models/ggml-$MODEL-encoder-vitisai.rai" \ + "https://huggingface.co/amd/whisper-$MODEL-onnx-npu/resolve/main/ggml-$MODEL-encoder-vitisai.rai" + [ $(stat -c%s "models/ggml-$MODEL-encoder-vitisai.rai") -gt 1000000 ] || { echo "ERROR: .rai too small"; exit 1; } + + - name: Run NPU smoke test + run: | + ./build/bin/whisper-cli -m "models/ggml-$MODEL.bin" -f samples/jfk.wav 2>&1 | tee vitisai.log + grep -qi "vitisai" vitisai.log || { echo "ERROR: no VitisAI activity - CPU fallback?"; exit 1; } + grep -qi "ask not what your country" vitisai.log || { echo "ERROR: incorrect transcription"; exit 1; } + + - name: Upload smoke test log + if: always() + uses: actions/upload-artifact@v4 + with: + name: vitisai-smoke-log-linux + path: vitisai.log From 240ed091d57d34d19247ddca7eba4b6e9621eb4f Mon Sep 17 00:00:00 2001 From: Iswarya Alex Date: Wed, 29 Jul 2026 22:02:11 -0700 Subject: [PATCH 02/10] Update runner --- .github/workflows/build-self-hosted.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-self-hosted.yml b/.github/workflows/build-self-hosted.yml index f9e8715f1..b9be60583 100644 --- a/.github/workflows/build-self-hosted.yml +++ b/.github/workflows/build-self-hosted.yml @@ -116,7 +116,7 @@ jobs: GG_BUILD_VULKAN=1 bash ./ci/run.sh ~/results/whisper.cpp ~/mnt/whisper.cpp amd-npu-windows: - runs-on: [self-hosted, Windows, stx, rai300_400] + runs-on: [self-hosted, Windows, X64, stx, rai300-400] timeout-minutes: 60 continue-on-error: true # advisory while the runner pool is new; revisit later From 29bc8871fb40f31a45496dd51bd62df6cb13b2ad Mon Sep 17 00:00:00 2001 From: Iswarya Alex Date: Wed, 29 Jul 2026 22:07:11 -0700 Subject: [PATCH 03/10] Update workflow for linux --- .github/workflows/build-self-hosted.yml | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/.github/workflows/build-self-hosted.yml b/.github/workflows/build-self-hosted.yml index b9be60583..dfafd4bd7 100644 --- a/.github/workflows/build-self-hosted.yml +++ b/.github/workflows/build-self-hosted.yml @@ -181,7 +181,9 @@ jobs: - name: Download ggml model shell: cmd run: | - call models\download-ggml-model.cmd %MODEL% + cd models + call download-ggml-model.cmd %MODEL% + cd .. if not exist models\ggml-%MODEL%.bin ( echo ERROR: model download failed & exit /b 1 ) - name: Download NPU encoder cache @@ -221,12 +223,6 @@ jobs: - name: Clone uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6 - - name: Install system deps - run: | - sudo apt-get update - sudo apt-get install -y build-essential cmake git \ - python3.12 python3.12-venv libboost-filesystem1.74.0 - - name: Verify NPU device run: | lsmod | grep -q amdxdna || { echo "ERROR: amdxdna driver not loaded"; exit 1; } From aa1a5cc02a4c46a0dcfefc0541e9ad203f76a724 Mon Sep 17 00:00:00 2001 From: Iswarya Alex Date: Wed, 29 Jul 2026 22:08:14 -0700 Subject: [PATCH 04/10] Update workflow for linux --- .github/workflows/build-self-hosted.yml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.github/workflows/build-self-hosted.yml b/.github/workflows/build-self-hosted.yml index dfafd4bd7..43f52fe72 100644 --- a/.github/workflows/build-self-hosted.yml +++ b/.github/workflows/build-self-hosted.yml @@ -181,9 +181,7 @@ jobs: - name: Download ggml model shell: cmd run: | - cd models - call download-ggml-model.cmd %MODEL% - cd .. + call models\download-ggml-model.cmd %MODEL% models if not exist models\ggml-%MODEL%.bin ( echo ERROR: model download failed & exit /b 1 ) - name: Download NPU encoder cache From fae02367f1838e345be847383a9a32df73edf08f Mon Sep 17 00:00:00 2001 From: Iswarya Alex Date: Wed, 29 Jul 2026 22:51:34 -0700 Subject: [PATCH 05/10] Update flexmlrt packages for linux --- .github/workflows/build-self-hosted.yml | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build-self-hosted.yml b/.github/workflows/build-self-hosted.yml index 43f52fe72..2b9311d46 100644 --- a/.github/workflows/build-self-hosted.yml +++ b/.github/workflows/build-self-hosted.yml @@ -121,7 +121,7 @@ jobs: continue-on-error: true # advisory while the runner pool is new; revisit later env: - FLEXML_URL: https://github.com/lemonade-sdk/whisper.cpp/releases/download/deps/flexmlrt1.7.0-win.zip + FLEXML_URL: https://github.com/lemonade-sdk/whisper.cpp-rocm/releases/download/deps/flexmlrt-1.7.0-win.zip MODEL: base steps: @@ -214,7 +214,7 @@ jobs: continue-on-error: true # advisory while the runner pool is new; revisit later env: - FLEXML_LINUX_URL: # TODO: fill in Linux FlexML runtime URL + FLEXML_LINUX_URL: https://github.com/lemonade-sdk/whisper.cpp-rocm/releases/download/deps/flexmlrt-1.8.0-linux.tar.gz MODEL: base steps: @@ -229,8 +229,9 @@ jobs: - name: Download FlexML runtime (Linux) run: | curl -L --fail -o flexmlrt.tar.gz "$FLEXML_LINUX_URL" - tar xf flexmlrt.tar.gz - # TODO: add Linux FlexML environment setup (equivalent of Windows setup.bat) + mkdir -p flexmlrt + tar xf flexmlrt.tar.gz -C flexmlrt + source flexmlrt/setup.sh echo "FlexmlRT_DIR=$PWD/flexmlrt/share/cmake/FlexmlRT" >> $GITHUB_ENV echo "LD_LIBRARY_PATH=$PWD/flexmlrt/lib:$LD_LIBRARY_PATH" >> $GITHUB_ENV From 622fe01bf2d7f3d191b2620e6db40a6745018758 Mon Sep 17 00:00:00 2001 From: Iswarya Alex Date: Wed, 29 Jul 2026 22:53:47 -0700 Subject: [PATCH 06/10] Update flexmlrt packages for linux --- .github/workflows/build-self-hosted.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/build-self-hosted.yml b/.github/workflows/build-self-hosted.yml index 2b9311d46..dd31b1d15 100644 --- a/.github/workflows/build-self-hosted.yml +++ b/.github/workflows/build-self-hosted.yml @@ -229,8 +229,7 @@ jobs: - name: Download FlexML runtime (Linux) run: | curl -L --fail -o flexmlrt.tar.gz "$FLEXML_LINUX_URL" - mkdir -p flexmlrt - tar xf flexmlrt.tar.gz -C flexmlrt + tar xf flexmlrt.tar.gz source flexmlrt/setup.sh echo "FlexmlRT_DIR=$PWD/flexmlrt/share/cmake/FlexmlRT" >> $GITHUB_ENV echo "LD_LIBRARY_PATH=$PWD/flexmlrt/lib:$LD_LIBRARY_PATH" >> $GITHUB_ENV From e3084ea0d4faa7f74698f2ab7b63510569a72f5f Mon Sep 17 00:00:00 2001 From: Iswarya Alex Date: Fri, 31 Jul 2026 14:27:50 -0700 Subject: [PATCH 07/10] Updated README --- .github/workflows/build-self-hosted.yml | 4 +- README.md | 91 +++++++++++++++++-------- 2 files changed, 64 insertions(+), 31 deletions(-) diff --git a/.github/workflows/build-self-hosted.yml b/.github/workflows/build-self-hosted.yml index dd31b1d15..9b4f5d294 100644 --- a/.github/workflows/build-self-hosted.yml +++ b/.github/workflows/build-self-hosted.yml @@ -115,7 +115,7 @@ jobs: vulkaninfo --summary GG_BUILD_VULKAN=1 bash ./ci/run.sh ~/results/whisper.cpp ~/mnt/whisper.cpp - amd-npu-windows: + npu-amd-windows: runs-on: [self-hosted, Windows, X64, stx, rai300-400] timeout-minutes: 60 continue-on-error: true # advisory while the runner pool is new; revisit later @@ -208,7 +208,7 @@ jobs: name: vitisai-smoke-log-windows path: vitisai.log - amd-npu-linux: + npu-amd-linux: runs-on: [self-hosted, Linux, X64, stx, rai300-400] timeout-minutes: 60 continue-on-error: true # advisory while the runner pool is new; revisit later diff --git a/README.md b/README.md index fd23e1c55..18f37d563 100644 --- a/README.md +++ b/README.md @@ -314,47 +314,80 @@ This can result in significant speedup in encoder performance. Here are the inst For more information about the OpenVINO implementation please refer to PR [#1037](https://github.com/ggml-org/whisper.cpp/pull/1037). -## AMD Ryzen™ AI support for NPU +## AMD Ryzen™ AI NPU support -On AMD's Ryzen™ AI 300 Series with dedicated NPUs for acceleration, you can now run Whisper models with the ability to fully offload the encoder to NPU. This brings significant speedup compared to CPU-only. -> **Note:** -> **Ryzen™ AI NPU acceleration is currently supported on Windows only.** Linux support is planned for upcoming releases. -> For the latest updates on Ryzen AI, check out [the official documentation](https://ryzenai.docs.amd.com/en/latest/). +On AMD Ryzen™ AI 300 and 400 Series processors with a dedicated NPU, whisper.cpp can fully offload the Whisper encoder to the NPU via VitisAI, delivering significant speedup over CPU-only inference. -### Setup environment (Windows only) +### Prerequisites - - Obtain the XRT package and the FlexmlRT package from AMD. Both are distributed as tarballs or wheels. - - Copy the downloaded archives to a local path, extract them, and run the setup script from each extracted package in your shell (for example `source /path/to/xrt/setup.sh` and `source /path/to/flexmlrt/setup.sh`). Run these in every new shell you use to build or run `whisper.cpp`. +Install the XRT runtime and FlexML runtime for your platform: -- Fetch the matching ggml model and prebuilt VitisAI encoder cache: +- **XRT**: provides the NPU kernel driver and `xrt-smi` diagnostic tool +- **FlexML runtime** (`flexmlrt`): VitisAI inference engine used by whisper.cpp — download from the [FlexML runtime releases](https://github.com/lemonade-sdk/whisper.cpp-rocm/releases/tag/deps) - ```bash - sh ./models/download-ggml-model.sh base - sh ./models/download-vitisai-model.sh base - ``` +After installing, source the setup scripts in every shell you use to build or run whisper.cpp: - ```cmd - .\models\download-ggml-model.cmd base - .\models\download-vitisai-model.cmd base - ``` +```bash +# Linux +source /opt/xilinx/xrt/setup.sh +source /path/to/flexmlrt/setup.sh +``` - Use the same model name with both scripts. The VitisAI script queries the AMD collection on Hugging Face to list available caches, then downloads the selected `.rai` file as `ggml--encoder-vitisai.rai` alongside the matching `ggml-.bin` file. You can also browse the collection manually at https://huggingface.co/collections/amd/ryzen-ai-whisper-npu-optimized-onnx-models. +```cmd +:: Windows +cd /path/to/flexmlrt && call setup.bat +``` - Depending on the downloaded `.rai` cache, VitisAI may offload either the encoder only or the encoder plus cross-projection layers to the AMD NPU. `whisper.cpp` detects the cache contents at runtime and logs the selected offload mode during model initialization. +You can verify the NPU is visible with: -- Build `whisper.cpp` with VitisAI support: +```bash +xrt-smi examine +``` - ```bash - cmake -B build -DWHISPER_VITISAI=1 - cmake --build build -j --config Release - ``` -Your environment is now ready. +### Download models -### Build Whisper.cpp for Ryzen™ AI support +Download the ggml model and the matching prebuilt VitisAI encoder cache: - ```text - $ ./build/bin/whisper-cli -m models/ggml-base.bin -f samples/jfk.wav - ``` +```bash +# Linux / macOS +sh ./models/download-ggml-model.sh base +sh ./models/download-vitisai-model.sh base +``` + +```cmd +:: Windows +.\models\download-ggml-model.cmd base +.\models\download-vitisai-model.cmd base +``` + +Use the same model name with both scripts. To see all available VitisAI encoder caches: + +```bash +sh ./models/download-vitisai-model.sh --list +``` + +```cmd +.\models\download-vitisai-model.cmd --list +``` + +The VitisAI script queries the [AMD Ryzen AI Whisper NPU collection on Hugging Face](https://huggingface.co/collections/amd/ryzen-ai-whisper-npu-optimized-onnx-models) and downloads the `.rai` encoder cache as `models/ggml--encoder-vitisai.rai`. + +> Depending on the `.rai` cache, VitisAI may offload the encoder only, or the encoder plus cross-projection layers. whisper.cpp detects this at runtime and logs the selected offload mode during model initialization. + +### Build + +```bash +cmake -B build -DWHISPER_VITISAI=1 +cmake --build build -j --config Release +``` + +### Run + +```bash +./build/bin/whisper-cli -m models/ggml-base.bin -f samples/jfk.wav +``` + +For more information see the [Ryzen AI documentation](https://ryzenai.docs.amd.com/en/latest/). ## NVIDIA GPU support From 2d5830d7911981b6f61b789e1b897900fa497f22 Mon Sep 17 00:00:00 2001 From: Iswarya Alex Date: Fri, 31 Jul 2026 15:13:26 -0700 Subject: [PATCH 08/10] readme: clarify xrt --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 18f37d563..3f80acbec 100644 --- a/README.md +++ b/README.md @@ -322,7 +322,7 @@ On AMD Ryzen™ AI 300 and 400 Series processors with a dedicated NPU, whisper.c Install the XRT runtime and FlexML runtime for your platform: -- **XRT**: provides the NPU kernel driver and `xrt-smi` diagnostic tool +- **XRT**: provides the NPU kernel driver and `xrt-smi` diagnostic tool — on Windows this is bundled with the NPU driver; on Linux install it separately following the [NPU driver installation guide](https://ryzenai.docs.amd.com/en/latest/linux.html#install-npu-drivers) - **FlexML runtime** (`flexmlrt`): VitisAI inference engine used by whisper.cpp — download from the [FlexML runtime releases](https://github.com/lemonade-sdk/whisper.cpp-rocm/releases/tag/deps) After installing, source the setup scripts in every shell you use to build or run whisper.cpp: From 7233ef5d4224766b1f9f35679a0f2d22711a9fc5 Mon Sep 17 00:00:00 2001 From: Iswarya Alex Date: Fri, 31 Jul 2026 15:16:17 -0700 Subject: [PATCH 09/10] readme: clarify xrt --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 3f80acbec..9de9ed5ac 100644 --- a/README.md +++ b/README.md @@ -22,7 +22,7 @@ High-performance inference of [OpenAI's Whisper](https://github.com/openai/whisp - Support for CPU-only inference - [Efficient GPU support for NVIDIA](#nvidia-gpu-support) - [AMD ROCm GPU support](#amd-rocm-gpu-support) -- [AMD Ryzen AI NPU Support](#amd-ryzen-ai-support-for-npu) +- [AMD Ryzen AI NPU Support](#amd-ryzen-ai-npu-support) - [OpenVINO Support](#openvino-support) - [Ascend NPU Support](#ascend-npu-support) - [Moore Threads GPU Support](#moore-threads-gpu-support) From 7469ea099a009006ac30703977c4afe95802f451 Mon Sep 17 00:00:00 2001 From: Iswarya Alex Date: Fri, 31 Jul 2026 15:27:03 -0700 Subject: [PATCH 10/10] ci: update test config --- .github/workflows/build-self-hosted.yml | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/.github/workflows/build-self-hosted.yml b/.github/workflows/build-self-hosted.yml index 9b4f5d294..b689df084 100644 --- a/.github/workflows/build-self-hosted.yml +++ b/.github/workflows/build-self-hosted.yml @@ -185,13 +185,10 @@ jobs: if not exist models\ggml-%MODEL%.bin ( echo ERROR: model download failed & exit /b 1 ) - name: Download NPU encoder cache - shell: powershell + shell: cmd run: | - curl.exe -L --fail -o "models/ggml-$env:MODEL-encoder-vitisai.rai" ` - "https://huggingface.co/amd/whisper-$env:MODEL-onnx-npu/resolve/main/ggml-$env:MODEL-encoder-vitisai.rai" - $f = Get-Item "models/ggml-$env:MODEL-encoder-vitisai.rai" - Write-Host ".rai size: $([math]::Round($f.Length/1MB,2)) MB" - if ($f.Length -lt 1MB) { Write-Error ".rai suspiciously small - wrong URL or LFS pointer?"; exit 1 } + .\models\download-vitisai-model.cmd %MODEL% + if not exist models\ggml-%MODEL%-encoder-vitisai.rai ( echo ERROR: VitisAI encoder cache download failed & exit /b 1 ) - name: Run NPU smoke test shell: cmd @@ -245,9 +242,8 @@ jobs: - name: Download NPU encoder cache run: | - curl -L --fail -o "models/ggml-$MODEL-encoder-vitisai.rai" \ - "https://huggingface.co/amd/whisper-$MODEL-onnx-npu/resolve/main/ggml-$MODEL-encoder-vitisai.rai" - [ $(stat -c%s "models/ggml-$MODEL-encoder-vitisai.rai") -gt 1000000 ] || { echo "ERROR: .rai too small"; exit 1; } + sh ./models/download-vitisai-model.sh $MODEL + [ -f "models/ggml-$MODEL-encoder-vitisai.rai" ] || { echo "ERROR: VitisAI encoder cache download failed"; exit 1; } - name: Run NPU smoke test run: |