|
1 | | -name: SDXL Models Nightly |
| 1 | +name: SDXL E2E Pipeline CI |
2 | 2 |
|
3 | 3 | on: |
| 4 | + workflow_dispatch: |
| 5 | + pull_request: |
4 | 6 | schedule: |
5 | | - - cron: '30 6 * * *' |
| 7 | + - cron: "*/50 * * * *" |
| 8 | + |
| 9 | +concurrency: |
| 10 | + # A PR number if a pull request and otherwise the commit hash. This cancels |
| 11 | + # queued and in-progress runs for the same PR (presubmit) or commit |
| 12 | + # (postsubmit). The workflow name is prepended to avoid conflicts between |
| 13 | + # different workflows. |
| 14 | + group: ${{ github.workflow }}-${{ github.event.number || github.sha }} |
| 15 | + cancel-in-progress: true |
6 | 16 |
|
7 | 17 | jobs: |
8 | 18 | test-sdxl-models: |
9 | 19 | strategy: |
10 | 20 | matrix: |
11 | 21 | version: [3.11] |
12 | | - os: [nodai-amdgpu-w7900-x86-64] |
| 22 | + os: [nodai-amdgpu-mi300-x86-64] |
13 | 23 |
|
14 | 24 | runs-on: ${{matrix.os}} |
| 25 | + env: |
| 26 | + IREE_TOKEN: ${{ secrets.IREE_TOKEN }} |
15 | 27 | steps: |
16 | 28 | - name: "Setting up Python" |
17 | 29 | uses: actions/setup-python@75f3110429a8c05be0e1bf360334e4cced2b63fa # v2.3.3 |
18 | 30 | with: |
19 | 31 | python-version: ${{matrix.version}} |
20 | 32 |
|
21 | | - - name: "Checkout Code" |
| 33 | + - name: "Checkout SHARK-ModelDev" |
22 | 34 | uses: actions/checkout@v4 |
23 | 35 | with: |
24 | | - ref: ean-sd-fp16 |
| 36 | + ref: bump-punet-tom |
25 | 37 |
|
26 | 38 | - name: "Checkout iree-turbine" |
27 | 39 | uses: actions/checkout@v4 |
28 | 40 | with: |
29 | 41 | repository: iree-org/iree-turbine |
30 | | - # TODO: Let the ref be passed as a parameter to run integration tests. |
31 | 42 | path: iree-turbine |
| 43 | + |
| 44 | + - name: "Checkout iree" |
| 45 | + uses: actions/checkout@v4 |
| 46 | + with: |
| 47 | + repository: iree-org/iree |
| 48 | + path: iree |
32 | 49 |
|
33 | | - - name: Sync source deps |
34 | | - # build IREE from source with -DIREE_BUILD_TRACY=ON if getting tracy profile |
| 50 | + - name: Python deps |
35 | 51 | run: | |
| 52 | + python3.11 -m venv sdxl_venv |
| 53 | + source sdxl_venv/bin/activate |
36 | 54 | python -m pip install --upgrade pip |
37 | | - # Note: We install in three steps in order to satisfy requirements |
38 | | - # from non default locations first. Installing the PyTorch CPU |
39 | | - # wheels saves multiple minutes and a lot of bandwidth on runner setup. |
40 | | - pip install --no-compile --index-url https://download.pytorch.org/whl/cpu \ |
41 | | - -r ${{ github.workspace }}/iree-turbine//pytorch-cpu-requirements.txt |
42 | | - pip install --no-compile --upgrade -r ${{ github.workspace }}/iree-turbine/requirements.txt |
43 | | - pip install --no-compile -e ${{ github.workspace }}/iree-turbine/[testing,torch-cpu-nightly] |
44 | | - pip install --no-compile --upgrade -r models/requirements.txt |
45 | | - pip install --no-compile -e models |
46 | | - |
| 55 | + pip install --no-compile -r ${{ github.workspace }}/iree-turbine/pytorch-cpu-requirements.txt |
| 56 | + pip install --pre --upgrade -r ${{ github.workspace }}/iree-turbine/requirements.txt |
| 57 | + pip install --no-compile --pre --upgrade -e models -r models/requirements.txt |
| 58 | + pip uninstall torch torchvision torchaudio -y |
| 59 | + pip install https://download.pytorch.org/whl/nightly/pytorch_triton_rocm-3.0.0%2B21eae954ef-cp311-cp311-linux_x86_64.whl |
| 60 | + pip install https://download.pytorch.org/whl/nightly/rocm6.1/torch-2.5.0.dev20240710%2Brocm6.1-cp311-cp311-linux_x86_64.whl |
| 61 | + pip install https://download.pytorch.org/whl/nightly/rocm6.1/torchvision-0.20.0.dev20240711%2Brocm6.1-cp311-cp311-linux_x86_64.whl |
| 62 | + pip install https://download.pytorch.org/whl/nightly/rocm6.1/torchaudio-2.4.0.dev20240711%2Brocm6.1-cp311-cp311-linux_x86_64.whl |
| 63 | + pip uninstall iree-compiler iree-runtime iree-base-compiler iree-base-runtime -y |
| 64 | + python ci-tools/latest-pkgci.py |
| 65 | + cd wheels |
| 66 | + unzip *.zip |
| 67 | + pip install *.whl |
| 68 | + cd .. |
| 69 | + rm -rf wheels |
| 70 | +
|
47 | 71 | - name: Show current free memory |
48 | 72 | run: | |
49 | 73 | free -mh |
50 | 74 |
|
51 | 75 | - name: Run sdxl tests |
52 | 76 | run: | |
53 | | - pip install --upgrade --pre torch torchvision --index-url https://download.pytorch.org/whl/nightly/cpu |
54 | | - pytest models/turbine_models/tests/sdxl_test.py --device cpu --rt_device local-task --iree_target_triple x86_64-linux-gnu |
55 | | - pytest models/turbine_models/tests/sdxl_test.py --device vulkan --rt_device vulkan --iree_target_triple rdna3-unknown-linux |
56 | | - pytest models/turbine_models/tests/sdxl_test.py --device rocm --rt_device rocm --iree_target_triple gfx90a |
| 77 | + source sdxl_venv/bin/activate |
| 78 | + 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 |
0 commit comments