Numba-CUDA-MLIR
Numba-CUDA-MLIR provides a programming model similar to CUDA C++ in Python. It is evolved from Numba-CUDA, and is intended to be compatible with Numba-CUDA kernels.
Numba-CUDA-MLIR aims to interoperate well with existing programming models whilst also allowing experts sufficient control over code generation.
Quick Start
Install with pip:
pip install numba-cuda-mlir[cu13] # or [cu12] if using CUDA 12
Writing and executing a simple vector add kernel:
import numpy as np
from numba_cuda_mlir import cuda
@cuda.jit
def vector_add(a, b, out):
i = cuda.grid(1)
if i < out.shape[0]:
out[i] = a[i] + b[i]
n = 1_000_000
a = np.ones(n, dtype=np.float32)
b = np.ones(n, dtype=np.float32)
out = np.zeros(n, dtype=np.float32)
threads_per_block = 256
blocks = (n + threads_per_block - 1) // threads_per_block
vector_add[blocks, threads_per_block](a, b, out)
Migration from Numba / Numba-CUDA
Change imports to use the numba_cuda_mlir.cuda package instead of
numba.cuda. For example:
from numba import cuda
becomes:
from numba_cuda_mlir import cuda
For the majority of code using Numba-CUDA, this should be a sufficient change to enable the use of Numba-CUDA-MLIR. For code using the extension APIs, modifications will be required as Numba-CUDA-MLIR uses MLIR in its code generation process instead of LLVM IR. See the Migration Guidance in the documentation for further details.
Installation Requirements
- Python >= 3.11, with:
- The
cuda.coreandcuda-bindingspackages - NumPy >= 1.22
- The
- CUDA Toolkit components (CUDA Runtime, NVCC, NVRTC, and nvJitLink) installed via pip or a system package manager (Linux).
- NVIDIA GPU with Compute Capability 7.0 or greater and a compatible driver:
- >= r525 for CUDA 12.x
- >= r580 for CUDA 13.x
Installation guidance
For full details of installation methods including from packages and building from source and testing, please see INSTALL.md.
Contributing to Numba-CUDA-MLIR
See the Contribution Guidelines for information on how to set up a development environment and follow the contribution process.
Benchmarks
A small suite of benchmarks can be executed from the source repository by running:
pytest tests/benchmarks/ --benchmark -s
Licensing
Numba-CUDA-MLIR is distributed under the Apache License 2.0.
It incorporates the following third-party projects, each retained under its original license:
- numba-cuda — BSD 2-Clause License
- cloudpickle — BSD 3-Clause License
- appdirs — MIT License
- LLVM Project / EUDSL — Apache License 2.0 WITH LLVM-exception
See NOTICE for
the full attribution map and per-component locations in this repository, and
THIRD-PARTY-LICENSES
for the verbatim upstream license texts.
Contributions are accepted under the terms described in
CONTRIBUTING.md.
Release files for cubie-numba-cuda-mlir 0.5.1.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distributions (wheels)
Total release size: 742.9 MB
Release files / cubie_numba_cuda_mlir-0.5.1.2-cp314-cp314-win_amd64.whl
| Download URL | cubie_numba_cuda_mlir-0.5.1.2-cp314-cp314-win_amd64.whl |
|---|---|
| Size | 48.3 MB |
| Tags | CPython 3.14 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
49105521f256148484d2c6364572795257a013fbe1d1f33a0a10e11f5982bc5c
|
|
BLAKE2b-256 checksum How to use checksums |
224b5457c35c4ccf4dde9358bed1e2b88380dfcf5e371ba33619eb1245515e94
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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 Sep 18, 2026.
Transparency logRelease files / cubie_numba_cuda_mlir-0.5.1.2-cp314-cp314-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
| Download URL | cubie_numba_cuda_mlir-0.5.1.2-cp314-cp314-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl |
|---|---|
| Size | 71.2 MB |
| Tags | CPython 3.14 Linux glibc 2.27+ x86-64 Linux glibc 2.28+ x86-64 |
|
SHA-256 checksum How to use checksums |
f733df113f122661520d2ac9635d5dc084e0074ee2239f0b5e0d069a055355b1
|
|
BLAKE2b-256 checksum How to use checksums |
5781fffed40dcd0fbdb67ad09b7a05c71fb3aa665967ac1ff2c5e62adff622e5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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 Sep 18, 2026.
Transparency logRelease files / cubie_numba_cuda_mlir-0.5.1.2-cp314-cp314-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl
| Download URL | cubie_numba_cuda_mlir-0.5.1.2-cp314-cp314-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl |
|---|---|
| Size | 67.2 MB |
| Tags | CPython 3.14 Linux glibc 2.27+ ARM64 Linux glibc 2.28+ ARM64 |
|
SHA-256 checksum How to use checksums |
5268beb2ef8bfbada8f19b6aa412a10086294e51f3c079f59a6adc77fbfab3cc
|
|
BLAKE2b-256 checksum How to use checksums |
24dbf601c7bfdeb943f43428dee61998e09e8dce24fab34979750c0d3b776f87
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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 Sep 18, 2026.
Transparency logRelease files / cubie_numba_cuda_mlir-0.5.1.2-cp313-cp313-win_amd64.whl
| Download URL | cubie_numba_cuda_mlir-0.5.1.2-cp313-cp313-win_amd64.whl |
|---|---|
| Size | 47.0 MB |
| Tags | CPython 3.13 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
5a245752ded8d1f87982539be4b1fb3d1a150707a134cb404a9a070462c0e874
|
|
BLAKE2b-256 checksum How to use checksums |
0d2503ebfe36b2a06d8279a255566456e09dac710971ab1f91a342db452e96bf
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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 Sep 18, 2026.
Transparency logRelease files / cubie_numba_cuda_mlir-0.5.1.2-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
| Download URL | cubie_numba_cuda_mlir-0.5.1.2-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl |
|---|---|
| Size | 71.2 MB |
| Tags | CPython 3.13 Linux glibc 2.27+ x86-64 Linux glibc 2.28+ x86-64 |
|
SHA-256 checksum How to use checksums |
0247757ff2cf516c20b4d37330b85ad254a7eb32129eb08d66a0a6222a27a491
|
|
BLAKE2b-256 checksum How to use checksums |
a3789d23a1a5caf5786d64e8a280038ceddf6663bfa9800892a00794d465dd1d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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 Sep 18, 2026.
Transparency logRelease files / cubie_numba_cuda_mlir-0.5.1.2-cp313-cp313-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl
| Download URL | cubie_numba_cuda_mlir-0.5.1.2-cp313-cp313-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl |
|---|---|
| Size | 67.2 MB |
| Tags | CPython 3.13 Linux glibc 2.27+ ARM64 Linux glibc 2.28+ ARM64 |
|
SHA-256 checksum How to use checksums |
ef4c476adcf172c21fbc8d04c32e08f452a3b64b8771c27c644916a9899ea9eb
|
|
BLAKE2b-256 checksum How to use checksums |
127431a95a418b8871e86fc9476c6127045ee5f5eb2980740b4eb783f1c9c7e2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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 Sep 18, 2026.
Transparency logRelease files / cubie_numba_cuda_mlir-0.5.1.2-cp312-cp312-win_amd64.whl
| Download URL | cubie_numba_cuda_mlir-0.5.1.2-cp312-cp312-win_amd64.whl |
|---|---|
| Size | 47.0 MB |
| Tags | CPython 3.12 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
c208faa08b7c178936927eb76134b90a15f93f0b244c217c74298187aa8b8e5d
|
|
BLAKE2b-256 checksum How to use checksums |
49883e96fd65c4308777c417eae76ed1838e46ec10526e2d3982033d69b553f0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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 Sep 18, 2026.
Transparency logRelease files / cubie_numba_cuda_mlir-0.5.1.2-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
| Download URL | cubie_numba_cuda_mlir-0.5.1.2-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl |
|---|---|
| Size | 71.2 MB |
| Tags | CPython 3.12 Linux glibc 2.27+ x86-64 Linux glibc 2.28+ x86-64 |
|
SHA-256 checksum How to use checksums |
68c633e625edfdfa653e388686d467b41274732c2dc750a3589656822c5115ca
|
|
BLAKE2b-256 checksum How to use checksums |
1ae694b749e9b139f95b0cef3c00a32a7ca5bc3e0149208d879eb28b28c8a923
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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 Sep 18, 2026.
Transparency logRelease files / cubie_numba_cuda_mlir-0.5.1.2-cp312-cp312-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl
| Download URL | cubie_numba_cuda_mlir-0.5.1.2-cp312-cp312-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl |
|---|---|
| Size | 67.2 MB |
| Tags | CPython 3.12 Linux glibc 2.27+ ARM64 Linux glibc 2.28+ ARM64 |
|
SHA-256 checksum How to use checksums |
0a39573b31a58816146211a8c4b4fad8d9d04870e114f0b0bd03bb2da26884dc
|
|
BLAKE2b-256 checksum How to use checksums |
815f9ffbd69729cb3edf51e020443353af1add407a521e2e91793163b272a235
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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 Sep 18, 2026.
Transparency logRelease files / cubie_numba_cuda_mlir-0.5.1.2-cp311-cp311-win_amd64.whl
| Download URL | cubie_numba_cuda_mlir-0.5.1.2-cp311-cp311-win_amd64.whl |
|---|---|
| Size | 47.0 MB |
| Tags | CPython 3.11 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
b45ef58e5069e6c2f967359dcbc8d5d2336abc0b0648184668cbe4d8a174b4e1
|
|
BLAKE2b-256 checksum How to use checksums |
39536a69d12f9483bab8212888cf3171fa2c73c03f3f4ede7f394347ea7ce93f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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 Sep 18, 2026.
Transparency logRelease files / cubie_numba_cuda_mlir-0.5.1.2-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
| Download URL | cubie_numba_cuda_mlir-0.5.1.2-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl |
|---|---|
| Size | 71.1 MB |
| Tags | CPython 3.11 Linux glibc 2.27+ x86-64 Linux glibc 2.28+ x86-64 |
|
SHA-256 checksum How to use checksums |
c13d5b38107d95ed7d3fc5f412d4caf410307ee0c3bdb71a019eb51bfd586a7a
|
|
BLAKE2b-256 checksum How to use checksums |
16c31e68a3ac976fdb3c9f89dc62304b3aa962a6e1ceb719bc440cc2a24a3ca8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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 Sep 18, 2026.
Transparency logRelease files / cubie_numba_cuda_mlir-0.5.1.2-cp311-cp311-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl
| Download URL | cubie_numba_cuda_mlir-0.5.1.2-cp311-cp311-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl |
|---|---|
| Size | 67.2 MB |
| Tags | CPython 3.11 Linux glibc 2.27+ ARM64 Linux glibc 2.28+ ARM64 |
|
SHA-256 checksum How to use checksums |
f6ff4203f90567702bdbffc1a9b4c4033fe785ec266b24f527ecdc884723354b
|
|
BLAKE2b-256 checksum How to use checksums |
10f5eb1217c9a2d7799397dae74bf93bf77ceabfe5dae70aa4919040226a8b24
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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 Sep 18, 2026.
Transparency log