Unifies SD pipeline APIs, adds sd3 support, punet integration #967
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: Test Turbine Models | |
on: | |
workflow_dispatch: | |
pull_request: | |
push: | |
branches: | |
- main | |
concurrency: | |
# A PR number if a pull request and otherwise the commit hash. This cancels | |
# queued and in-progress runs for the same PR (presubmit) or commit | |
# (postsubmit). The workflow name is prepended to avoid conflicts between | |
# different workflows. | |
group: ${{ github.workflow }}-${{ github.event.number || github.sha }} | |
cancel-in-progress: true | |
jobs: | |
test-turbine-models: | |
strategy: | |
matrix: | |
version: [3.11] | |
os: [nodai-amdgpu-mi250-x86-64] | |
runs-on: ${{matrix.os}} | |
steps: | |
# We are using a persistent Gentoo runner here, and this python action is not supported for the arch | |
# - name: "Setting up Python" | |
# uses: actions/setup-python@75f3110429a8c05be0e1bf360334e4cced2b63fa # v2.3.3 | |
# with: | |
# python-version: ${{matrix.version}} | |
- name: "Checkout This Repo" | |
uses: actions/checkout@v4 | |
- name: "Checkout iree-turbine" | |
uses: actions/checkout@v4 | |
with: | |
repository: iree-org/iree-turbine | |
# TODO: Let the ref be passed as a parameter to run integration tests. | |
path: iree-turbine | |
- name: Sync source deps | |
# build IREE from source with -DIREE_BUILD_TRACY=ON if getting tracy profile | |
run: | | |
python3.11 -m venv turbine_venv | |
source turbine_venv/bin/activate | |
python3.11 -m pip install --upgrade pip | |
pip install --no-compile -r ${{ github.workspace }}/iree-turbine/pytorch-cpu-requirements.txt | |
pip install --no-compile --pre --no-cache-dir -r ${{ github.workspace }}/iree-turbine/iree-requirements.txt -f https://iree.dev/pip-release-links.html | |
pip install --no-compile --pre --upgrade -e models -r models/requirements.txt | |
- name: Show current free memory | |
run: | | |
free -mh | |
- name: Run stateless_llama tests | |
run: | | |
source turbine_venv/bin/activate | |
pytest -v models/turbine_models/tests/stateless_llama_test.py | |
- name: Run sd tests | |
run: | | |
source turbine_venv/bin/activate | |
pytest -v models/turbine_models/tests/sd_test.py | |
pytest -v models/turbine_models/tests/sdxl_test.py --device cpu --rt_device local-task --iree_target_triple x86_64-linux-gnu --num_inference_steps 5 | |
pytest -v models/turbine_models/tests/sdxl_test.py --device vulkan --rt_device vulkan --iree_target_triple rdna3-unknown-linux | |
pytest -v models/turbine_models/tests/sdxl_test.py --device rocm --rt_device hip --iree_target_triple gfx90a --precision fp16 --attn_spec default | |
pytest -v models/turbine_models/tests/sdxl_test.py --device rocm --rt_device hip --iree_target_triple gfx90a --precision fp16 --attn_spec default --batch_size 2 |