-
Notifications
You must be signed in to change notification settings - Fork 48
78 lines (68 loc) · 3.07 KB
/
test_sdxl.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
name: SDXL E2E Pipeline CI
on:
workflow_dispatch:
pull_request:
schedule:
- cron: "*/50 * * * *"
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-sdxl-models:
strategy:
matrix:
version: [3.11]
os: [nodai-amdgpu-mi300-x86-64]
runs-on: ${{matrix.os}}
env:
IREE_TOKEN: ${{ secrets.IREE_TOKEN }}
steps:
- name: "Setting up Python"
uses: actions/setup-python@75f3110429a8c05be0e1bf360334e4cced2b63fa # v2.3.3
with:
python-version: ${{matrix.version}}
- name: "Checkout SHARK-ModelDev"
uses: actions/checkout@v4
with:
ref: bump-punet-tom
- name: "Checkout iree-turbine"
uses: actions/checkout@v4
with:
repository: iree-org/iree-turbine
path: iree-turbine
- name: "Checkout iree"
uses: actions/checkout@v4
with:
repository: iree-org/iree
path: iree
- name: Python deps
run: |
python3.11 -m venv sdxl_venv
source sdxl_venv/bin/activate
python -m pip install --upgrade pip
pip install --no-compile -r ${{ github.workspace }}/iree-turbine/pytorch-cpu-requirements.txt
pip install --pre --upgrade -r ${{ github.workspace }}/iree-turbine/requirements.txt
pip install --no-compile --pre --upgrade -e models -r models/requirements.txt
pip uninstall torch torchvision torchaudio -y
pip install https://download.pytorch.org/whl/nightly/pytorch_triton_rocm-3.0.0%2B21eae954ef-cp311-cp311-linux_x86_64.whl
pip install https://download.pytorch.org/whl/nightly/rocm6.1/torch-2.5.0.dev20240710%2Brocm6.1-cp311-cp311-linux_x86_64.whl
pip install https://download.pytorch.org/whl/nightly/rocm6.1/torchvision-0.20.0.dev20240711%2Brocm6.1-cp311-cp311-linux_x86_64.whl
pip install https://download.pytorch.org/whl/nightly/rocm6.1/torchaudio-2.4.0.dev20240711%2Brocm6.1-cp311-cp311-linux_x86_64.whl
pip uninstall iree-compiler iree-runtime iree-base-compiler iree-base-runtime -y
python ci-tools/latest-pkgci.py
cd wheels
unzip *.zip
pip install *.whl
cd ..
rm -rf wheels
- name: Show current free memory
run: |
free -mh
- name: Run sdxl tests
run: |
source sdxl_venv/bin/activate
python3 models/turbine_models/custom_models/sd_inference/sd_pipeline.py --device=hip --precision=fp16 --iree_target_triple=gfx942 --external_weights=safetensors --hf_model_name=stabilityai/stable-diffusion-xl-base-1.0 --width=1024 --height=1024 --batch_size=1 --use_i8_punet --attn_spec=punet --vae_decomp_attn --external_weights=safetensors --num_inference_steps=20 --benchmark=all --verbose