Skip to main content

IREE Dispatch Tuner

Project description

SHARK Tuner

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 sharktuner
python -m venv .venv
source .venv/bin/activate

Install python dependencies:

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

IREE's Python bindings setup:

Using the local IREE's Python bindings:

  • Building with CMake

    Configure

    cmake -G Ninja -B ../iree-build/ -S . \
    -DCMAKE_BUILD_TYPE=RelWithDebInfo \
    -DCMAKE_C_COMPILER=clang \
    -DCMAKE_CXX_COMPILER=clang++ \
    -DIREE_HAL_DRIVER_HIP=ON -DIREE_TARGET_BACKEND_ROCM=ON \
    -DIREE_BUILD_PYTHON_BINDINGS=ON \
    -DPython3_EXECUTABLE="$(which python3)"
    

    Build

    cmake --build ../iree-build/
    

[!IMPORTANT] Make sure to enable the ROCM and HIP in your cmake configuration. See IREE documentation for the details.

  • Set environment

    source ../iree-build/.env && export PYTHONPATH
    export PATH="$(realpath ../iree-build/tools):$PATH"
    

For more information, refer to the IREE documentation.

Using nightly IREE's Python bindings:

pip install --upgrade -r ../requirements-iree-unpinned.txt

Examples

For a concrete example, check the model_tuner directory for a sample tuner implemented with libtuner. The dispatch example should be a good starting point for most users.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

sharktuner-3.5.0-py3-none-any.whl (36.4 kB view details)

Uploaded Python 3

File details

Details for the file sharktuner-3.5.0-py3-none-any.whl.

File metadata

  • Download URL: sharktuner-3.5.0-py3-none-any.whl
  • Upload date:
  • Size: 36.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.13

File hashes

Hashes for sharktuner-3.5.0-py3-none-any.whl
Algorithm Hash digest
SHA256 294f064d4f05e4d002c9b605cd425828d4fdf6700e1f2f348cbb79ab47ec7f19
MD5 525b3a9fbbb06ff2283c648c22064b14
BLAKE2b-256 be9f30d0abaa815c9cc6d0843b76f72140a636b3a14b5186ca2c3e493df293a8

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page