Add graph capture and shaders to improve DirectML performance #1481
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: "Windows CPU arm64 Build" | |
on: | |
workflow_dispatch: | |
push: | |
branches: | |
- main | |
- rel-* | |
pull_request: | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} | |
cancel-in-progress: true | |
env: | |
ort_dir: "onnxruntime-win-arm64-1.17.3" | |
ort_zip: "$(ort_dir).zip" | |
ort_url: "https://github.com/microsoft/onnxruntime/releases/download/v1.17.3/$(ort_zip)" | |
binaryDir: 'build/cpu' | |
jobs: | |
windows-cpu-arm64-build: | |
runs-on: [ "self-hosted", "1ES.Pool=onnxruntime-genai-Win11-ARM-CPU" ] | |
steps: | |
- name: Checkout OnnxRuntime GenAI repo | |
uses: actions/checkout@v4 | |
with: | |
submodules: true | |
- name: Setup Visual Studio 2022 | |
uses: microsoft/[email protected] | |
with: | |
vs-version: '17.4' | |
msbuild-architecture: arm64 | |
- name: Download OnnxRuntime | |
run: | | |
$env:ort_url = "https://github.com/microsoft/onnxruntime/releases/download/v1.17.3/onnxruntime-win-arm64-1.17.3.zip" | |
Invoke-WebRequest -Uri $env:ort_url -OutFile $env:ort_zip | |
- name: Unzip OnnxRuntime | |
run: | | |
Expand-Archive $env:ort_zip -DestinationPath . | |
Remove-Item -Path $env:ort_zip | |
- name: Rename OnnxRuntime to ort | |
run: | | |
Rename-Item -Path $env:ort_dir -NewName ort | |
- name: Configure CMake | |
run: | | |
cmake --preset windows_arm64_cpu_release | |
- name: Build with CMake | |
run: | | |
cmake --build --preset windows_arm64_cpu_release --parallel | |
- name: Install the Python Wheel and Test Dependencies | |
run: | | |
python -m pip install (Get-ChildItem ("$env:binaryDir\wheel\*.whl")) | |
python -m pip install -r test\python\requirements.txt | |
- name: Run the Python Tests | |
run: | | |
python test/python/test_onnxruntime_genai.py --cwd "test\python" --test_models "test\test_models" | |
- name: Build the C# API and Run the C# Tests | |
run: | | |
cd test\csharp | |
dotnet test /p:NativeBuildOutputDir="$env:GITHUB_WORKSPACE\$env:binaryDir\Release" | |
- name: Verify Build Artifacts | |
if: always() | |
continue-on-error: true | |
run: | | |
Get-ChildItem -Path $env:GITHUB_WORKSPACE\$env:binaryDir -Recurse | |
Get-ChildItem -Path $env:GITHUB_WORKSPACE\$env:binaryDir\test -Recurse | |
- name: Run tests | |
run: | | |
.\build\cpu\test\Release\unit_tests.exe |