Skip to content

Commit

Permalink
Cleanup requirements and packaging files. (#372)
Browse files Browse the repository at this point in the history
This is preparation for adding automation to handle updating dependency
versions.

* Renamed `iree-requirements.txt` and `iree-requirements-ci.txt` to
`requirements-iree-[un]pinned.txt` so they sort next to other
`requirements-*.txt` files and match the names used downstream in
https://github.com/nod-ai/shark-ai.
* Deleted `MANIFEST.in` that was unused since `package_data` in
`setup.py` does what those `include` lines used to:
https://github.com/iree-org/iree-turbine/blob/e4550f37dcd8b9b691db93c30b478c1d67eee83b/setup.py#L97-L100
* Sorted dependencies in `requirements.txt`.
* Deleted unused `mypy-requirements.txt`.
  • Loading branch information
ScottTodd authored Jan 10, 2025
1 parent a2b5302 commit 20adf5f
Show file tree
Hide file tree
Showing 10 changed files with 25 additions and 30 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/ci-tk.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ jobs:
id: cache-pip
with:
path: ${{ env.PIP_CACHE_DIR }}
key: pip-${{ steps.setup_python.outputs.python-version }}-${{ hashFiles('*requirements.txt') }}
key: pip-${{ steps.setup_python.outputs.python-version }}-${{ hashFiles('*requirements*.txt') }}

- name: Install pip deps
run: |
Expand All @@ -55,7 +55,7 @@ jobs:
# from non default locations first. Installing the PyTorch CPU
# wheels saves multiple minutes and a lot of bandwidth on runner setup.
pip install --no-compile -r pytorch-cpu-requirements.txt
pip install --no-cache-dir -r iree-requirements-ci.txt --upgrade
pip install --no-cache-dir -r requirements-iree-pinned.txt --upgrade
pip install -r requirements.txt -e .
- name: Run unit tests
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ jobs:
id: cache-pip
with:
path: ${{ env.PIP_CACHE_DIR }}
key: pip-${{ steps.setup_python.outputs.python-version }}-${{ hashFiles('*requirements.txt') }}
key: pip-${{ steps.setup_python.outputs.python-version }}-${{ hashFiles('*requirements*.txt') }}

- name: Install pip deps
run: |
Expand All @@ -56,7 +56,7 @@ jobs:
# from non default locations first. Installing the PyTorch CPU
# wheels saves multiple minutes and a lot of bandwidth on runner setup.
pip install --no-compile -r pytorch-cpu-requirements.txt
pip install --no-cache-dir -r iree-requirements-ci.txt
pip install --no-cache-dir -r requirements-iree-pinned.txt
pip install -r requirements.txt -e .
- name: Run unit tests
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/perf.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ jobs:
id: cache-pip
with:
path: ${{ env.PIP_CACHE_DIR }}
key: pip-${{ steps.setup_python.outputs.python-version }}-${{ hashFiles('*requirements.txt') }}
key: pip-${{ steps.setup_python.outputs.python-version }}-${{ hashFiles('*requirements*.txt') }}

- name: Install pip deps
run: |
Expand All @@ -57,7 +57,7 @@ jobs:
# from non default locations first. Installing the PyTorch CPU
# wheels saves multiple minutes and a lot of bandwidth on runner setup.
pip install --no-compile -r pytorch-rocm-requirements.txt
pip install --no-cache-dir -r iree-requirements-ci.txt --upgrade
pip install --no-cache-dir -r requirements-iree-pinned.txt --upgrade
pip install -r requirements.txt -e .
- name: Run e2e tests on MI300
Expand Down
5 changes: 0 additions & 5 deletions MANIFEST.in

This file was deleted.

7 changes: 2 additions & 5 deletions build_tools/build_release.py
Original file line number Diff line number Diff line change
Expand Up @@ -108,16 +108,13 @@ def _download_iree_binaries_for_platform_args(
]
args.extend(platform_args)
args += [
# Uncomment to allow nightly releases (if not pinned in the file)
# "-f",
# "https://iree.dev/pip-release-links.html",
"-f",
WHEEL_DIR,
# Note: could also drop `-ci` here, if coordinating a release
# Note: could also switch to unpinned if coordinating a release
# across projects and new stable versions of the IREE packages
# haven't yet been pushed.
"-r",
REPO_ROOT / "iree-requirements-ci.txt",
REPO_ROOT / "requirements-iree-pinned.txt",
]
exec(args)
except:
Expand Down
2 changes: 0 additions & 2 deletions iree-requirements.txt

This file was deleted.

3 changes: 0 additions & 3 deletions mypy-requirements.txt

This file was deleted.

7 changes: 2 additions & 5 deletions iree-requirements-ci.txt → requirements-iree-pinned.txt
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
# Requirements for CI jobs.
#
# Developer may want to install from iree-requirements.txt where we are more
# forgiving on the exact version.
# Pinned versions of IREE dependencies.

# Uncomment to select a nightly version.
# Allow downloading prerelease versions from nightly IREE releases.
--find-links https://iree.dev/pip-release-links.html
--pre

Expand Down
11 changes: 11 additions & 0 deletions requirements-iree-unpinned.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# Unpinned versions of IREE dependencies.

# Allow downloading prerelease versions from nightly IREE releases.
--find-links https://iree.dev/pip-release-links.html
--pre

# Uncomment to skip versions from PyPI (so _only_ nightly versions).
# --no-index

iree-base-compiler
iree-base-runtime
8 changes: 4 additions & 4 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
# Build/test requirements.
Jinja2==3.1.3
filecheck==1.0.0
lit==18.1.7
ml_dtypes==0.5.0
mypy==1.8.0
numpy
parameterized==0.9.0
pytest==8.0.0
pytest-xdist==3.5.0
lit==18.1.7
mypy==1.8.0
ml_dtypes==0.5.0
pytest==8.0.0
setuptools
typing_extensions
wheel
Expand Down

0 comments on commit 20adf5f

Please sign in to comment.