Add graph capture and shaders to improve DirectML performance #1477
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: "Linux CPU x64 Build" | |
on: [ workflow_dispatch, pull_request ] | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} | |
cancel-in-progress: true | |
env: | |
ort_dir: "onnxruntime-linux-x64-1.17.3" | |
ort_zip: "onnxruntime-linux-x64-1.17.3.tgz" | |
ort_url: "https://github.com/microsoft/onnxruntime/releases/download/v1.17.3/onnxruntime-linux-x64-1.17.3.tgz" | |
jobs: | |
linux_cpu_x64: | |
runs-on: [ "self-hosted", "1ES.Pool=onnxruntime-genai-Ubuntu2204-AMD-CPU" ] | |
steps: | |
- name: Checkout OnnxRuntime GenAI repo | |
uses: actions/checkout@v4 | |
with: | |
submodules: true | |
- name: Download OnnxRuntime | |
run: | | |
curl -L -o ${{ env.ort_zip }} ${{ env.ort_url }} | |
- name: Unzip OnnxRuntime | |
run: | | |
tar -xzf ${{ env.ort_zip }} | |
rm ${{ env.ort_zip }} | |
- name: Rename OnnxRuntime to ort | |
run: | | |
mv ${{ env.ort_dir }} ort | |
- name: Build with CMake and GCC | |
run: | | |
set -e -x | |
rm -rf build | |
cmake --preset linux_gcc_cpu_release | |
cmake --build --preset linux_gcc_cpu_release | |
- name: Install the python wheel and test dependencies | |
run: | | |
python3 -m pip install build/cpu/wheel/onnxruntime_genai*.whl | |
python3 -m pip install -r test/python/requirements-nightly-cpu.txt --user | |
- name: Get HuggingFace Token | |
run: | | |
az login --identity --username 63b63039-6328-442f-954b-5a64d124e5b4 | |
HF_TOKEN=$(az keyvault secret show --vault-name anubissvcsecret --name ANUBIS-HUGGINGFACE-TOKEN --query value) | |
echo "::add-mask::$HF_TOKEN" | |
echo "HF_TOKEN=$HF_TOKEN" >> $GITHUB_ENV | |
# This will also download all the test models to the test/test_models directory | |
# These models are used by the python tests as well as C#, C++ and others. | |
- name: Run the python tests | |
run: | | |
python3 test/python/test_onnxruntime_genai.py --cwd test/python --test_models test/test_models | |
- name: Verify Build Artifacts | |
if: always() | |
continue-on-error: true | |
run: | | |
ls -l ${{ github.workspace }}/build/cpu | |
- name: Run tests | |
run: | | |
set -e -x | |
./build/cpu/test/unit_tests |