Skip to content

Latest commit

 

History

History
37 lines (34 loc) · 1.24 KB

README.md

File metadata and controls

37 lines (34 loc) · 1.24 KB

IREE dispatch auto-tuning scripts

libtuner.py is the core Python script that provides the fundamental functions for the tuning loop. It imports candidate_gen.py for candidate generation. To implement the full tuning loop, libtuner.py requires a separate Python script that uses the provided TuningClient API from libtuner.py.

Prerequisites

[Optional] Using virtual environments:

cd tuner
python -m venv .venv
source .venv/bin/activate

Install python dependencies:

pip install -r requirements-tuner.txt
pip install -r requirements-dev.txt

Using the IREE's Python bindings:

  • Building with CMake
    -DIREE_BUILD_PYTHON_BINDINGS=ON \
    -DPython3_EXECUTABLE="$(which python)"
  • Set environment
    source ../iree-build/.env && export PYTHONPATH
    export PATH="$(realpath ../iree-build/tools):$PATH"

For more information, refer to the IREE documentation.

Examples

Check the examples directory for sample tuners implemented with libtuner. The dispatch example should be a good starting point for most users.