Skip to main content

Wave: Python Domain-Specific Language for High Performance Machine Learning

Motivation

Wave is a high-level programming language designed to accelerate the development and optimization of machine learning kernels. It aims to dramatically improve kernel author velocity in two critical dimensions:

Implementation Velocity

Wave enables rapid prototyping of new optimization ideas and algorithms through its high-level abstractions and symbolic programming model. Kernel authors can quickly express complex tensor operations and experiment with different optimization strategies without getting bogged down in low-level implementation details.

Performance Velocity

The language is designed to achieve high performance with minimal tuning effort. Through its declarative constraints and hardware-aware abstractions, Wave automatically generates optimized GPU code, allowing kernel authors to focus on algorithmic innovation rather than manual optimization.

Wave is particularly focused on the machine learning domain, with deep integration into the PyTorch ecosystem. This integration enables:

  1. Seamless transition from PyTorch models to optimized GPU kernels
  2. Easy experimentation with new ML algorithms and optimizations
  3. Rapid deployment of custom kernels in production ML pipelines
  4. Direct reuse of PyTorch’s tensor abstractions and operator semantics

The language bridges the gap between high-level ML programming and low-level GPU performance by providing a flexible and expressive programming model that maintains close control over hardware resources while enabling rapid innovation in the ML space.

Core Design Principles

Wave is built around several key design principles that guide its architecture and implementation:

  • Symbolic Programming Model
  • Heavy use of symbolic variables to represent tensor dimensions
  • Symbolic expressions for memory access patterns and layouts
  • Enables compile-time optimization and analysis
  • Provides flexibility in expressing complex tensor operations
  • Separation of Distribution and Computation
  • Clear separation between distribution strategy and computation graph
  • Distribution strategy defined through declarative constraints
  • Computation graph expressed independently of parallelization
  • Enables better optimization and code reuse
  • Dual Programming Models
  • Support for both tile-based and SIMT-based programming models
  • Tile-based model for coarse-grained parallelism
  • SIMT model for fine-grained vector operations
  • Flexible mapping to different GPU architectures
  • Hardware-Aware Abstractions
  • Direct mapping to GPU hardware concepts (workgroups, waves, etc.)
  • Explicit control over memory hierarchy
  • Hardware-specific optimizations (MMA operations, memory layouts)
  • Performance portability across different GPU architectures

For more information, visit the documentation here: https://wave-lang.readthedocs.io/en/latest/wave/wave.html

Quickstart

Wave supports both end users (who want to use Wave kernels in their ML workflows) and developers (who want to contribute to or extend Wave). Follow the relevant guide below to get started quickly.

Prequisites

Before installing Wave, ensure you have the following prerequisites:

  • Python 3.10 or later
  • PyTorch
  • ROCm (for AMD GPU support)
  • A compatible AMD GPU with ROCm support (MI250, MI300, etc.) or CPU

For Users

  1. Install ROCm PyTorch Dependencies

    Before installing Wave, ensure you have the appropriate ROCm-enabled PyTorch dependencies:

    pip install -r pytorch-rocm-requirements.txt
    
  2. Install Wave

    You can then install Wave and its dependencies using pip:

    pip install wave-lang
    
  3. Try the Example Notebook

    To get started, try the examples/jupyter/wave_gemm_example.ipynb notebook.

For Developers

  1. Clone the Repository

    git clone https://github.com/iree-org/wave.git
    cd wave
    
  2. Install Development Dependencies

    If you don't have Rust already installed on your system, install Rust using the following command:

    curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
    

    Next, install the python dependencies. It is recommended to use a virtual environment.

    python -m venv .venv
    source .venv/bin/activate
    pip install --upgrade pip
    pip install -r requirements-iree-pinned.txt
    pip install -r pytorch-rocm-requirements.txt
    pip install -r requirements.txt -e .
    

    Note: If you do not have access to Instinct GPUs, you can still install Wave as above but with the CPU version of PyTorch:

    pip install -r pytorch-cpu-requirements.txt
    

    Currently, you can only run lit tests in this mode.

  3. Run Tests

    To verify your setup:

    # Python tests
    pytest -s tests/
    # To run end to end tests, add --run-e2e flag
    
    # Lit tests
    lit lit_tests/ -v
    
  4. Contributing

    Please see CONTRIBUTING.md for guidelines on contributing to Wave.

Metadata

Release files for wave-lang 3.9.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distributions (wheels)

Table of built distributions (wheels) for wave-lang 3.9.1
File Actions
wave_lang-3.9.1-cp313-cp313-win_amd64.whl CPython 3.13 CPython 3.13 Windows x86-64 Details for wave_lang-3.9.1-cp313-cp313-win_amd64.whl
wave_lang-3.9.1-cp313-cp313-manylinux_2_28_x86_64.whl CPython 3.13 CPython 3.13 Linux glibc 2.28+ x86-64 Details for wave_lang-3.9.1-cp313-cp313-manylinux_2_28_x86_64.whl
wave_lang-3.9.1-cp312-cp312-win_amd64.whl CPython 3.12 CPython 3.12 Windows x86-64 Details for wave_lang-3.9.1-cp312-cp312-win_amd64.whl
wave_lang-3.9.1-cp312-cp312-manylinux_2_28_x86_64.whl CPython 3.12 CPython 3.12 Linux glibc 2.28+ x86-64 Details for wave_lang-3.9.1-cp312-cp312-manylinux_2_28_x86_64.whl
wave_lang-3.9.1-cp311-cp311-win_amd64.whl CPython 3.11 CPython 3.11 Windows x86-64 Details for wave_lang-3.9.1-cp311-cp311-win_amd64.whl
wave_lang-3.9.1-cp311-cp311-manylinux_2_28_x86_64.whl CPython 3.11 CPython 3.11 Linux glibc 2.28+ x86-64 Details for wave_lang-3.9.1-cp311-cp311-manylinux_2_28_x86_64.whl
wave_lang-3.9.1-cp310-cp310-win_amd64.whl CPython 3.10 CPython 3.10 Windows x86-64 Details for wave_lang-3.9.1-cp310-cp310-win_amd64.whl
wave_lang-3.9.1-cp310-cp310-manylinux_2_28_x86_64.whl CPython 3.10 CPython 3.10 Linux glibc 2.28+ x86-64 Details for wave_lang-3.9.1-cp310-cp310-manylinux_2_28_x86_64.whl

Total release size: 7.6 MB

Release files / wave_lang-3.9.1-cp313-cp313-win_amd64.whl

Download URL wave_lang-3.9.1-cp313-cp313-win_amd64.whl
Size 792.9 kB
Tags CPython 3.13 Windows x86-64
SHA-256 checksum
How to use checksums
68fe14f23f4f8335469a6d9128431760cf1c097f191966578af51a4187f843b9
BLAKE2b-256 checksum
How to use checksums
4597c801184511b2f926ff9eff94adb5c054098a99e7b819861c9440593c75e6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Dec 23, 2025.

Transparency log

Release files / wave_lang-3.9.1-cp313-cp313-manylinux_2_28_x86_64.whl

Download URL wave_lang-3.9.1-cp313-cp313-manylinux_2_28_x86_64.whl
Size 1.1 MB
Tags CPython 3.13 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
4d43ff5bc87365ddbcccba76346d8079a2cf255c6c50ad04a4048581068e925c
BLAKE2b-256 checksum
How to use checksums
4f2bf31c05a0256753ccc95cb3e090ad1dc4a7a66624bec53380445e66b24a3c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Dec 23, 2025.

Transparency log

Release files / wave_lang-3.9.1-cp312-cp312-win_amd64.whl

Download URL wave_lang-3.9.1-cp312-cp312-win_amd64.whl
Size 793.0 kB
Tags CPython 3.12 Windows x86-64
SHA-256 checksum
How to use checksums
c49fa59432b87c9f965bdb857ec7a8a61b4a3f6c4137fcd3e7e384188dbce5fc
BLAKE2b-256 checksum
How to use checksums
81cfefdce4290867d602df66f780ec60ea7065046e5138a6022c93203ea04bfb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Dec 23, 2025.

Transparency log

Release files / wave_lang-3.9.1-cp312-cp312-manylinux_2_28_x86_64.whl

Download URL wave_lang-3.9.1-cp312-cp312-manylinux_2_28_x86_64.whl
Size 1.1 MB
Tags CPython 3.12 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
b9901c9ac210e4db1e22133ab439790e389277724fee07d8b8e7ee27ac025704
BLAKE2b-256 checksum
How to use checksums
31cf7d5022c6c3b41578f5e1d021e5dec5d44f9a42cfdeca3c69f482ec7bc2a6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Dec 23, 2025.

Transparency log

Release files / wave_lang-3.9.1-cp311-cp311-win_amd64.whl

Download URL wave_lang-3.9.1-cp311-cp311-win_amd64.whl
Size 793.1 kB
Tags CPython 3.11 Windows x86-64
SHA-256 checksum
How to use checksums
a3f5184290071a0db700723a559062748efcbf598295fbb6db77d53a419eab4a
BLAKE2b-256 checksum
How to use checksums
1dd7c6d5c5c366b1628c56650dbcb6da979e1690fd6fa2e755fc67c5fe0602e1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Dec 23, 2025.

Transparency log

Release files / wave_lang-3.9.1-cp311-cp311-manylinux_2_28_x86_64.whl

Download URL wave_lang-3.9.1-cp311-cp311-manylinux_2_28_x86_64.whl
Size 1.1 MB
Tags CPython 3.11 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
9da6687c95bd61c5f1b9bdc4e33b6b083e1e3d77226806f79137c7d5854f0d78
BLAKE2b-256 checksum
How to use checksums
a8b0e6d3d25eb481d273b3c6b25ecfcdb494d4a0b6f0984dec414b5152a93f6c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Dec 23, 2025.

Transparency log

Release files / wave_lang-3.9.1-cp310-cp310-win_amd64.whl

Download URL wave_lang-3.9.1-cp310-cp310-win_amd64.whl
Size 793.2 kB
Tags CPython 3.10 Windows x86-64
SHA-256 checksum
How to use checksums
566d1cba9cc2c8a47281207fecd98e035a5b7dae82500ecb7d7ad23b0aa6b3c4
BLAKE2b-256 checksum
How to use checksums
ac8ab12a69ec0ff352c57eb1aae7a47b31842438e16e7a8186d9426668bf9295
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Dec 23, 2025.

Transparency log

Release files / wave_lang-3.9.1-cp310-cp310-manylinux_2_28_x86_64.whl

Download URL wave_lang-3.9.1-cp310-cp310-manylinux_2_28_x86_64.whl
Size 1.1 MB
Tags CPython 3.10 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
97835dc4ef320afc307f52e46d20723cfa71e6b020b2cbd67a0d1d6af2398565
BLAKE2b-256 checksum
How to use checksums
28876066f64c0cb1086c5f6dba0435355956206553cf4bfb4162a3f8dc0a316e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Dec 23, 2025.

Transparency log

Security for wave-lang 3.9.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

All 8 files in this release have been uploaded with provenance metadata.

Select from 8 files

Attestation for wave_lang-3.9.1-cp313-cp313-win_amd64.whl

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Dec 23, 2025.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page