tree: 0a8a29777fab0e3b9ee99ae5806f8d4a8742ee80 [path history] [tgz]
  1. build_tools/
  2. pyiree/
  3. tests/
  4. BUILD
  5. build_defs.oss.bzl
  6. CMakeLists.txt
  7. README.md
  8. setup.py
  9. setup_compiler.py.in
  10. setup_runtime.py.in
  11. setup_tools_core.py.in
  12. setup_tools_tf.py.in
bindings/python/README.md

IREE Python API

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

Installing

First perform a normal CMake build with the following options:

  • -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 build directory, run:

# Install into a local installation or virtualenv.
python bindings/python/setup.py install

# Build wheels.
python bindings/python/setup.py bdist_wheel

Development mode

For development, just set your PYTHONPATH environment variable to the bindings/python directory in your CMake build dir.

Run tests

Tests under bindings/python/tests can be run directly once installed. Additional tests under integrations/tensorflow/e2e will be runnable soon.