flydsl
FlyDSL - ROCm Domain Specific Language for layout algebra (Python + embedded MLIR runtime)
What it is and what it does
FlyDSL is a Python domain-specific language for writing GPU kernels that run on ROCm hardware. It sits atop an embedded MLIR compiler stack (the Fly dialect) and lets you express kernel structure, data layouts, tiling strategies, and memory movement at a high level in Python, then compile them down to GPU machine code. The package bundles MLIR Python bindings so you don't need a separate MLIR installation.
The core abstraction is a layout system—Shape, Stride, and Layout objects that map logical coordinates to physical memory indices. You compose these layouts using algebra operations (composition, product, partition) to express complex data access patterns like swizzling, tiling, and vectorization. You decorate Python functions with `@flyc.kernel` or `@flyc.jit`, write kernel logic using FlyDSL's expression API (arithmetic, vector, GPU, ROCDL, buffer, math, and memory operations), and the JIT compiler handles lowering to GPU code. Pre-built kernels for GEMM, MoE, Softmax, and Norm are included.
Use it for:
- Author custom GPU kernels with explicit tiling and memory layout control without writing CUDA or HIP directly.
- Prototype and tune high-performance matrix multiplication and tensor operations on ROCm GPUs.
- Express complex data movement and swizzling patterns using layout algebra instead of manual indexing.
- Build production GPU kernels (GEMM, MoE, normalization) with the included pre-built kernel library.
- Benchmark and profile kernel performance using the built-in autotune and benchmarking infrastructure.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
FlyDSL is a Python DSL and embedded MLIR compiler for authoring high-performance GPU kernels with explicit data layouts, tiling, and partitioning on ROCm hardware.
Yes, if you are developing GPU kernels for ROCm hardware and want to express layouts and tiling at a high level. The package is actively maintained, has no known vulnerabilities, and bundles MLIR so setup is simpler than standalone MLIR. Install friction is medium due to ROCm dependency and optional source builds, but pre-built wheels for Python 3.10–3.14 are available. Not suitable if you need CUDA, OpenCL, or non-ROCm GPU support.
Install
flydsl on PyPI
pip
pip install flydsluv
uv add flydslpoetry
poetry add flydslInstalling flydsl
Before you install
Medium install friction: wheels are available for Python 3.10–3.14 on Linux x86_64, but the package bundles MLIR bindings and requires ROCm for GPU execution and testing. Source builds demand LLVM/MLIR compilation (30+ minutes) and C++17 tooling.
License in practice
Apache-2.0 permissive license allows commercial and proprietary use with minimal restrictions; attribution required.
Quickstart
pip install flydsl
import flydsl
print('FlyDSL installed')
ROCm is required for GPU execution, tests, and benchmarks; Python 3.8+ required; source builds need cmake >=3.20 and C++17 compiler.
Verify before relying
- Whether the embedded MLIR runtime is fully functional without a separate MLIR Python wheel installation in all environments.
- Performance characteristics and optimization potential compared to other GPU kernel DSLs or hand-written kernels.
- Maturity and stability of the layout algebra system and compiler passes in production use.
Package facts
| License | Apache-2.0 (permissive) |
| Python support | supports the current Python release (>=3.8) |
| Install friction | medium — platform-specific wheel |
| Runtime dependencies | none |
| Maintenance | actively maintained — 5 days since the last release |
| First released | |
| Downloads | 107,165/month — #12,627 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: flydsl-0.3.1-cp310-cp310-manylinux_2_27_x86_64.whl; flydsl-0.3.1-cp311-cp311-manylinux_2_27_x86_64.whl; flydsl-0.3.1-cp312-cp312-manylinux_2_27_x86_64.whl; flydsl-0.3.1-cp313-cp313-manylinux_2_27_x86_64.whl; flydsl-0.3.1-cp314-cp314-manylinux_2_27_x86_64.whl
Tags
More Scientific/Engineering packages
NumPy provides an N-dimensional array object…
permissive · top 100 on PyPI
pandaspandas provides fast, flexible data structures…
permissive · top 100 on PyPI
scipyscipy provides numerical algorithms for…
permissive · top 100 on PyPI
scikit-learnscikit-learn provides a comprehensive Python…
permissive · top 1,000 on PyPI
dilldill extends Python's pickle module to…
permissive · top 1,000 on PyPI
multiprocessMultiprocess is an enhanced fork of Python's…
permissive · top 1,000 on PyPI
nvidia-cutlass-dsl-libs-baseProvides Python interfaces for writing…
unclear · top 5,000 on PyPI
xdslxDSL is a Python framework for building…
permissive · top 15,000 on PyPI
nvidia-cutlass-dsl-libs-cu13Provides a Python DSL for writing…
unclear · top 5,000 on PyPI
nvidia-cutlass-dslProvides a Python native interface for writing…
unclear · top 5,000 on PyPI
nvidia-cutlass-dsl-libs-cu12Provides a Python DSL for writing…
unclear · top 5,000 on PyPI
nvidia-cutlass-dsl-libs-coreProvides a Python interface for writing…
unclear · top 5,000 on PyPI
tilelangTilelang is a domain-specific language for…
permissive · top 5,000 on PyPI
pyrsmiProvides Python bindings to monitor and manage…
permissive · top 15,000 on PyPI
sglang-kernelsglang-kernel provides optimized CUDA compute…
permissive · top 15,000 on PyPI
tosa-toolsTOSA Tools provides serialization, reference…
permissive · top 15,000 on PyPI