tree: 50bb5968c4b0046913b4e727a9c47fce7e685cc5 [search]
  1. iree/
  2. test/
  3. BUILD.bazel
  4. check_requirements.py
  5. CMakeLists.txt
  6. pyproject.toml
  7. README.md
  8. requirements.txt
  9. setup.py
  10. version.json
core/python/README.md

IREE Core Python Package

iree.core holds the pure-Python components shared by the IREE compiler (iree-base-compiler) and runtime (iree-base-runtime) packages. It is distributed as the iree-base-core wheel.

iree is a namespace package that iree.core shares with iree.compiler and iree.runtime, so there must be no iree/__init__.py.

Dependencies

pyproject.toml lists the dependencies of the wheel as version ranges. requirements.txt pins them with hashes for builds and CI. To regenerate it after a change, run the command at its top in this directory.

Testing

With Bazel:

bazel test //core/python/...

With CMake, the tests are registered if the Python interpreter of the build has the dependencies installed. The Python bindings are not needed:

python -m pip install --require-hashes -r core/python/requirements.txt
ctest --test-dir ${BUILD_DIR} -R iree/core/python

Against the installed package:

python -m pip install core/python/
python -m unittest discover -s core/python/test -p "*_test.py"