Skip to content

Commit 56b8460

Browse files
ScottToddeagarvey-amd
authored andcommitted
Switch presubmit CI workflows to use pinned IREE versions. (#774)
Progress on #760. The idea here is that we will test with only pinned versions in all workflows that run on `pull_request` and `push` triggers, then we will create pull requests (ideally via automation like dependabot) that attempt to update the pinned versions. This will give us confidence that test regressions are _only_ due to the code changes in the pull request and not due to a dependency changing. Workflows will also be more reproducible as the versions they fetch will come from source code and not an external, time-dependent source.
1 parent 9f1383a commit 56b8460

7 files changed

+42
-71
lines changed

.github/workflows/ci-llama-quick-tests.yaml

+5-10
Original file line numberDiff line numberDiff line change
@@ -55,18 +55,13 @@ jobs:
5555
python -m pip install --no-compile --upgrade pip
5656
5757
# Note: We install in three steps in order to satisfy requirements
58-
# from non default locations first. Installing the PyTorch CPU
59-
# wheels saves multiple minutes and a lot of bandwidth on runner setup.
58+
# from non default locations first.
6059
pip install --no-compile -r pytorch-cpu-requirements.txt
60+
pip install -r requirements-iree-pinned.txt
61+
pip install --no-compile \
62+
-r sharktank/requirements-tests.txt \
63+
-e sharktank/
6164
62-
# Install nightly IREE packages.
63-
# We could also pin to a known working or stable version.
64-
pip install -f https://iree.dev/pip-release-links.html --pre --upgrade \
65-
iree-base-compiler \
66-
iree-base-runtime \
67-
iree-turbine
68-
69-
pip install --no-compile -r requirements.txt -r sharktank/requirements-tests.txt -e sharktank/
7065
pip freeze
7166
7267
- name: Run llama 8b f16 decomposed test

.github/workflows/ci-shark-ai.yml

+5-11
Original file line numberDiff line numberDiff line change
@@ -51,18 +51,12 @@ jobs:
5151
python -m pip install --no-compile --upgrade pip
5252
5353
# Note: We install in three steps in order to satisfy requirements
54-
# from non default locations first. Installing the PyTorch CPU
55-
# wheels saves multiple minutes and a lot of bandwidth on runner setup.
54+
# from non default locations first.
5655
pip install --no-compile -r pytorch-cpu-requirements.txt
57-
58-
# Install nightly IREE packages.
59-
# We could also pin to a known working or stable version.
60-
pip install -f https://iree.dev/pip-release-links.html --pre --upgrade \
61-
iree-base-compiler \
62-
iree-base-runtime \
63-
iree-turbine
64-
65-
pip install --no-compile -r requirements.txt -e sharktank/ shortfin/
56+
pip install -r requirements-iree-pinned.txt
57+
pip install --no-compile \
58+
-r requirements.txt \
59+
-e sharktank/ shortfin/
6660
6761
pip freeze
6862

.github/workflows/ci-sharktank.yml

+21-31
Original file line numberDiff line numberDiff line change
@@ -72,18 +72,15 @@ jobs:
7272
python -m pip install --no-compile --upgrade pip
7373
7474
# Note: We install in three steps in order to satisfy requirements
75-
# from non default locations first. Installing the PyTorch CPU
76-
# wheels saves multiple minutes and a lot of bandwidth on runner setup.
77-
pip install --no-compile --index-url https://download.pytorch.org/whl/cpu torch==${{matrix.torch-version}}+cpu
75+
# from non default locations first.
76+
pip install --no-compile \
77+
--index-url https://download.pytorch.org/whl/cpu torch==${{matrix.torch-version}}+cpu
78+
pip install -r requirements-iree-pinned.txt
79+
pip install --no-compile \
80+
-r sharktank/requirements-tests.txt \
81+
-e sharktank/
7882
79-
# Install nightly IREE packages.
80-
# We could also pin to a known working or stable version.
81-
pip install -f https://iree.dev/pip-release-links.html --pre \
82-
iree-base-compiler \
83-
iree-base-runtime \
84-
iree-turbine
85-
86-
pip install --no-compile -r requirements.txt -r sharktank/requirements-tests.txt -e sharktank/
83+
pip freeze
8784
8885
- name: Run sharktank tests
8986
if: ${{ !cancelled() }}
@@ -121,19 +118,16 @@ jobs:
121118
run: |
122119
source ${VENV_DIR}/bin/activate
123120
python -m pip install --no-compile --upgrade pip
121+
124122
# Note: We install in three steps in order to satisfy requirements
125-
# from non default locations first. Installing the PyTorch CPU
126-
# wheels saves multiple minutes and a lot of bandwidth on runner setup.
123+
# from non default locations first.
127124
pip install --no-compile -r pytorch-cpu-requirements.txt
125+
pip install -r requirements-iree-pinned.txt
126+
pip install --no-compile \
127+
-r sharktank/requirements-tests.txt \
128+
-e sharktank/
128129
129-
# Install nightly IREE packages.
130-
# We could also pin to a known working or stable version.
131-
pip install -f https://iree.dev/pip-release-links.html --pre --upgrade \
132-
iree-base-compiler \
133-
iree-base-runtime \
134-
iree-turbine
135-
136-
pip install --no-compile -r requirements.txt -r sharktank/requirements-tests.txt -e sharktank/
130+
pip freeze
137131
138132
- name: Run tests
139133
# TODO: unify with-*-data flags into a single flag and make it possible to run
@@ -180,18 +174,14 @@ jobs:
180174
python -m pip install --no-compile --upgrade pip
181175
182176
# Note: We install in three steps in order to satisfy requirements
183-
# from non default locations first. Installing the PyTorch CPU
184-
# wheels saves multiple minutes and a lot of bandwidth on runner setup.
177+
# from non default locations first.
185178
pip install --no-compile -r pytorch-cpu-requirements.txt
179+
pip install -r requirements-iree-pinned.txt
180+
pip install --no-compile \
181+
-r sharktank/requirements-tests.txt \
182+
-e sharktank/
186183
187-
# Install nightly IREE packages.
188-
# We could also pin to a known working or stable version.
189-
pip install -f https://iree.dev/pip-release-links.html --pre \
190-
iree-base-compiler \
191-
iree-base-runtime \
192-
iree-turbine
193-
194-
pip install --no-compile -r requirements.txt -r sharktank/requirements-tests.txt -e sharktank/
184+
pip freeze
195185
196186
- name: Run punet tests
197187
run: |

.github/workflows/ci_eval_short.yaml

+5-10
Original file line numberDiff line numberDiff line change
@@ -52,18 +52,13 @@ jobs:
5252
python -m pip install --no-compile --upgrade pip
5353
5454
# Note: We install in three steps in order to satisfy requirements
55-
# from non default locations first. Installing the PyTorch CPU
56-
# wheels saves multiple minutes and a lot of bandwidth on runner setup.
55+
# from non default locations first.
5756
pip install --no-compile -r pytorch-cpu-requirements.txt
57+
pip install -r requirements-iree-pinned.txt
58+
pip install --no-compile \
59+
-r sharktank/requirements-tests.txt \
60+
-e sharktank/
5861
59-
# Install nightly IREE packages.
60-
# We could also pin to a known working or stable version.
61-
pip install -f https://iree.dev/pip-release-links.html --pre --upgrade \
62-
iree-base-compiler \
63-
iree-base-runtime \
64-
iree-turbine
65-
66-
pip install --no-compile -r requirements.txt -r sharktank/requirements-tests.txt -e sharktank/
6762
pip freeze
6863
6964
- name: Run perplexity test with vmfb

requirements-iree-pinned.txt

+3-5
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,6 @@
33
# Keep these versions synced with SHORTFIN_IREE_GIT_TAG in shortfin/CMakeLists.txt
44
--pre
55
--find-links https://iree.dev/pip-release-links.html
6-
iree-base-compiler==3.1.0rc20241206
7-
iree-base-runtime==3.1.0rc20241206
8-
9-
# TODO(#760): include iree-turbine in this requirements file too?
10-
# iree-turbine==3.1.0rc20241206
6+
iree-base-compiler==3.1.0rc20250107
7+
iree-base-runtime==3.1.0rc20250107
8+
iree-turbine==3.1.0rc20250107

requirements-iree-unpinned.txt

+1-3
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,4 @@
44
--find-links https://iree.dev/pip-release-links.html
55
iree-base-compiler
66
iree-base-runtime
7-
8-
# TODO(#760): include iree-turbine in this requirements file too?
9-
# iree-turbine
7+
iree-turbine

sharktank/requirements-tests.txt

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
datasets==3.0.0
2+
diffusers
23
parameterized
34
pytest==8.0.0
45
pytest-html
5-
diffusers
6+
pytest-xdist==3.5.0

0 commit comments

Comments
 (0)