Top-level packages:
pyiree.compiler2
: Main compiler API (soon to be renamed to ‘compiler’).pyiree.rt
: Runtime components for executing binaries.pyiree.tools.core
: Core tools for executing the compiler.pyiree.tools.tf
: TensorFlow compiler tools (if enabled).Deprecated packages:
pyiree.compiler
pyiree.common
pyiree.tf.compiler
First perform a normal CMake build/install with the following options:
-DCMAKE_INSTALL_PREFIX=...path to install to...
: Sets up installation prefix.-DIREE_BUILD_PYTHON_BINDINGS=ON
: Enables Python Bindings-DIREE_BUILD_TENSORFLOW_COMPILER=ON
(optional) : Enables building the TensorFlow compilers (note: requires additional dependencies. see overall build docs).Then from the install directory, run:
# Multiple packages will exist under python_packages. Choose the one you want. cd python_packages/iree_compiler # Install into a local installation or virtualenv. python setup.py install python -m pip wheel .
For development, just set your PYTHONPATH
environment variable to the bindings/python
directory in your CMake build dir.
Tests under bindings/python/tests
can be run directly once installed. Additional tests under integrations/tensorflow/e2e
will be runnable soon.