|
| 1 | +name: Windows x64 QNN CI Pipeline |
| 2 | + |
| 3 | +on: |
| 4 | + push: |
| 5 | + branches: |
| 6 | + - main |
| 7 | + - rel-* |
| 8 | + pull_request: |
| 9 | + branches: |
| 10 | + - main |
| 11 | + - rel-* |
| 12 | + workflow_dispatch: |
| 13 | + |
| 14 | +concurrency: |
| 15 | + group: ${{ github.workflow }}-${{ github.event_name == 'pull_request' && github.ref || github.sha }} |
| 16 | + cancel-in-progress: true |
| 17 | + |
| 18 | +jobs: |
| 19 | + build_test_qnn_ep: |
| 20 | + name: Windows x64 QNN CI Pipeline (${{ matrix.QnnLibKind }}) |
| 21 | + runs-on: ["self-hosted", "1ES.Pool=onnxruntime-github-vs2022-mms"] |
| 22 | + timeout-minutes: 120 |
| 23 | + strategy: |
| 24 | + matrix: |
| 25 | + QnnLibKind: [shared_lib, static_lib] |
| 26 | + env: |
| 27 | + AZCOPY_AUTO_LOGIN_TYPE: MSI |
| 28 | + AZCOPY_MSI_CLIENT_ID: 63b63039-6328-442f-954b-5a64d124e5b4 |
| 29 | + DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true |
| 30 | + ALLOW_RELEASED_ONNX_OPSET_ONLY: '1' |
| 31 | + |
| 32 | + steps: |
| 33 | + - name: Checkout repository |
| 34 | + uses: actions/checkout@v5 |
| 35 | + |
| 36 | + - name: Setup Python |
| 37 | + uses: actions/setup-python@v5 |
| 38 | + with: |
| 39 | + python-version: '3.12' |
| 40 | + architecture: x64 |
| 41 | + |
| 42 | + - name: Locate vcvarsall and Setup Env |
| 43 | + uses: ./.github/actions/locate-vcvarsall-and-setup-env |
| 44 | + with: |
| 45 | + architecture: x64 |
| 46 | + |
| 47 | + - name: Download QNN SDK |
| 48 | + working-directory: ${{ runner.temp }} |
| 49 | + run: | |
| 50 | + azcopy.exe cp --recursive https://lotusscus.blob.core.windows.net/models/qnnsdk/qnn-v2.38.0.250901 . |
| 51 | + dir |
| 52 | + shell: pwsh |
| 53 | + |
| 54 | + - name: Set QNN_SDK_ROOT environment variable |
| 55 | + shell: pwsh |
| 56 | + run: | |
| 57 | + $qnn_sdk_path = Join-Path $env:RUNNER_TEMP "qnn-v2.38.0.250901" |
| 58 | + echo "QNN_SDK_ROOT=$qnn_sdk_path" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append |
| 59 | + echo "QNN SDK Root: $qnn_sdk_path" |
| 60 | + dir $qnn_sdk_path |
| 61 | +
|
| 62 | + - name: Build and Test |
| 63 | + shell: cmd |
| 64 | + run: | |
| 65 | + python ${{ github.workspace }}\tools\ci_build\build.py --config RelWithDebInfo --build_dir ${{ runner.temp }}\build --cmake_generator "Visual Studio 17 2022" --build_java --build_shared_lib --use_qnn ${{ matrix.QnnLibKind }} --qnn_home %QNN_SDK_ROOT% --use_binskim_compliant_compile_flags --update --build --test --enable_onnx_tests --parallel |
| 66 | +
|
| 67 | + - name: Run ONNX Tests |
| 68 | + shell: cmd |
| 69 | + working-directory: ${{ runner.temp }}\build\RelWithDebInfo\RelWithDebInfo |
| 70 | + run: | |
| 71 | + .\onnx_test_runner -j 1 -e qnn -i "backend_path|%QNN_SDK_ROOT%\lib\x86_64-windows-msvc\QnnCpu.dll" ${{ github.workspace }}\cmake\external\onnx\onnx\backend\test\data\node |
| 72 | +
|
| 73 | + - name: Run float32 model tests |
| 74 | + shell: cmd |
| 75 | + working-directory: ${{ runner.temp }}\build\RelWithDebInfo\RelWithDebInfo |
| 76 | + run: | |
| 77 | + rem This step assumes the model data exists at C:\data\float32_models on the runner |
| 78 | + if exist C:\data\float32_models ( |
| 79 | + .\onnx_test_runner -j 1 -e qnn -i "backend_path|%QNN_SDK_ROOT%\lib\x86_64-windows-msvc\QnnCpu.dll" C:\data\float32_models |
| 80 | + ) else ( |
| 81 | + echo "Skipping float32 model tests: C:\data\float32_models not found." |
| 82 | + ) |
0 commit comments