Skip to content

Commit

Permalink
Switch to new IREE package names and versions. (#258)
Browse files Browse the repository at this point in the history
IREE is renaming its Python packages from `iree-compiler` and
`iree-runtime` to `iree-base-compiler` and `iree-base-runtime`, in order
to switch to a new versioning scheme:
iree-org/iree#18938. This switches to using
the new package names and versions and cleans up some related
documentation along the way.

Note: the new packages are not yet built and published, hence this is a
draft PR. Once packages are published we can rebase, test this, and then
proceed.
  • Loading branch information
ScottTodd authored Nov 9, 2024
1 parent 11d23c1 commit 4a3f8c9
Show file tree
Hide file tree
Showing 8 changed files with 25 additions and 26 deletions.
9 changes: 4 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -118,9 +118,9 @@ commits locally, hooks will run. See https://pre-commit.com/
### Using a development compiler

If doing native development of the compiler, it can be useful to switch to
source builds for iree-compiler and iree-runtime.
source builds for iree-base-compiler and iree-base-runtime.

In order to do this, check out [IREE](https://github.com/openxla/iree) and
In order to do this, check out [IREE](https://github.com/iree-org/iree) and
follow the instructions to [build from source](https://iree.dev/building-from-source/getting-started/), making
sure to specify [additional options for the Python bindings](https://iree.dev/building-from-source/getting-started/#building-with-cmake):

Expand All @@ -130,11 +130,10 @@ sure to specify [additional options for the Python bindings](https://iree.dev/bu

#### Configuring python

Uninstall existing packages:
Uninstall existing packages (including any with the old package names):

```bash
pip uninstall iree-compiler
pip uninstall iree-runtime
pip uninstall iree-compiler iree-base-compiler iree-runtime iree-base-runtime
```

Copy the `.env` file from `iree/` to this source directory to get IDE
Expand Down
2 changes: 1 addition & 1 deletion build_tools/post_pypi_release_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ WHEELHOUSE_DIR="${REPO_ROOT?}/wheelhouse"

# Use same environment from build_release, but uninstall the local wheels
source "${WHEELHOUSE_DIR}"/test.venv/bin/activate
pip uninstall -y shark-turbine iree-turbine iree-compiler iree-runtime
pip uninstall -y iree-turbine iree-base-compiler iree-base-runtime

# Install from pypi now that latest is released
pip install iree-turbine
Expand Down
16 changes: 6 additions & 10 deletions docs/releasing.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# Releasing iree-turbine

This project hosts the https://pypi.org/project/iree-turbine/ package, which
depends on the https://pypi.org/project/iree-compiler/ and
https://pypi.org/project/iree-runtime/ packages. Releases can either be
depends on the https://pypi.org/project/iree-base-compiler/ and
https://pypi.org/project/iree-base-runtime/ packages. Releases can either be
conducted independently, or they can be coordinated across projects by
initiating a release here.

Expand All @@ -21,8 +21,8 @@ Build an official release:
```

This will download all deps, including wheels for all supported platforms and
Python versions for iree-compiler and iree-runtime. All wheels will be placed
in the `wheelhouse/` directory.
Python versions for iree-base-compiler and iree-base-runtime. All wheels will
be placed in the `wheelhouse/` directory.

## Testing

Expand All @@ -47,7 +47,7 @@ pip freeze
Push IREE deps (if needed/updated):

```bash
twine upload wheelhouse/iree_compiler-* wheelhouse/iree_runtime-*
twine upload wheelhouse/iree_base_compiler-* wheelhouse/iree_base_runtime-*
```

Push built wheels:
Expand All @@ -58,12 +58,8 @@ twine upload wheelhouse/iree_turbine-*

## Install from PyPI and Sanity Check

TODO: Script this

From the testing venv:

```bash
pip uninstall -y iree-turbine iree-compiler iree-runtime
pip install iree-turbine
pytest .
./build_tools/post_pypi_release_test.sh
```
9 changes: 6 additions & 3 deletions iree-requirements-ci.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,10 @@
# forgiving on the exact version.

# Uncomment to select a nightly version.
--find-links https://iree.dev/pip-release-links.html
# --find-links https://iree.dev/pip-release-links.html

iree-compiler==20241107.1071
iree_runtime==20241107.1071
# Uncomment to skip versions from PyPI (so _only_ nightly versions).
# --no-index

iree-base-compiler<=2.9.0
iree-base-runtime<=2.9.0
4 changes: 2 additions & 2 deletions iree-requirements.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
iree-compiler
iree-runtime
iree-base-compiler
iree-base-runtime
2 changes: 1 addition & 1 deletion iree/turbine/aot/builtins/globals.py
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ def __getitem__(self, key):
return self._tree[key]

def __repr__(self):
names = [name for name, _ in self._param_list]
names = [name for name, _ in self._buffer_list]
return f"<export_buffers {', '.join(names)}>"


Expand Down
5 changes: 3 additions & 2 deletions iree/turbine/aot/support/procedural/exported_program.py
Original file line number Diff line number Diff line change
Expand Up @@ -252,8 +252,9 @@ def store_produced_value(
raise ValueError(f"Cannot store value to unmapped global for: {info}")
logger.debug("Resolved global for store %r", mapping)
materialized_global: MaterializedGlobal = mapping.value # type: ignore
assert isinstance(materialized_global.global_op, util_d.GlobalOp)
materialized_global.global_op.is_mutable = True
materialized_global_op_opview = materialized_global.global_op.opview
assert isinstance(materialized_global_op_opview, util_d.GlobalOp)
materialized_global_op_opview.is_mutable = True
converted_value = Operation.create(
"torch_c.to_builtin_tensor",
results=[materialized_global.ir_type],
Expand Down
4 changes: 2 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,8 +104,8 @@ def initialize_options(self):
},
install_requires=[
f"numpy{get_version_spec('numpy')}",
f"iree-compiler{get_version_spec('iree-compiler')}",
f"iree-runtime{get_version_spec('iree-runtime')}",
f"iree-base-compiler{get_version_spec('iree-base-compiler')}",
f"iree-base-runtime{get_version_spec('iree-base-runtime')}",
"torch>=2.3.0",
f"Jinja2{get_version_spec('Jinja2')}",
],
Expand Down

0 comments on commit 4a3f8c9

Please sign in to comment.