Skip to main content

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.core and cuda-bindings packages
    • NumPy >= 1.22
  • CUDA Toolkit components (CUDA Runtime, NVCC, NVRTC, nvJitLink, and CCCL) 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:

  1. numba-cudaBSD 2-Clause License
  2. cloudpickleBSD 3-Clause License
  3. appdirsMIT License
  4. LLVM Project / EUDSLApache 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.

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 Distributions

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

cubie_numba_cuda_mlir-0.4.2.1-cp314-cp314-win_amd64.whl (48.3 MB view details)

Uploaded CPython 3.14Windows x86-64

cubie_numba_cuda_mlir-0.4.2.1-cp314-cp314-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (71.1 MB view details)

Uploaded CPython 3.14manylinux: glibc 2.27+ x86-64manylinux: glibc 2.28+ x86-64

cubie_numba_cuda_mlir-0.4.2.1-cp314-cp314-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl (67.2 MB view details)

Uploaded CPython 3.14manylinux: glibc 2.27+ ARM64manylinux: glibc 2.28+ ARM64

cubie_numba_cuda_mlir-0.4.2.1-cp313-cp313-win_amd64.whl (47.0 MB view details)

Uploaded CPython 3.13Windows x86-64

cubie_numba_cuda_mlir-0.4.2.1-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (71.1 MB view details)

Uploaded CPython 3.13manylinux: glibc 2.27+ x86-64manylinux: glibc 2.28+ x86-64

cubie_numba_cuda_mlir-0.4.2.1-cp313-cp313-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl (67.2 MB view details)

Uploaded CPython 3.13manylinux: glibc 2.27+ ARM64manylinux: glibc 2.28+ ARM64

cubie_numba_cuda_mlir-0.4.2.1-cp312-cp312-win_amd64.whl (47.0 MB view details)

Uploaded CPython 3.12Windows x86-64

cubie_numba_cuda_mlir-0.4.2.1-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (71.1 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.27+ x86-64manylinux: glibc 2.28+ x86-64

cubie_numba_cuda_mlir-0.4.2.1-cp312-cp312-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl (67.2 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.27+ ARM64manylinux: glibc 2.28+ ARM64

cubie_numba_cuda_mlir-0.4.2.1-cp311-cp311-win_amd64.whl (47.0 MB view details)

Uploaded CPython 3.11Windows x86-64

cubie_numba_cuda_mlir-0.4.2.1-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (71.1 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.27+ x86-64manylinux: glibc 2.28+ x86-64

cubie_numba_cuda_mlir-0.4.2.1-cp311-cp311-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl (67.2 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.27+ ARM64manylinux: glibc 2.28+ ARM64

File details

Details for the file cubie_numba_cuda_mlir-0.4.2.1-cp314-cp314-win_amd64.whl.

File metadata

File hashes

Hashes for cubie_numba_cuda_mlir-0.4.2.1-cp314-cp314-win_amd64.whl
Algorithm Hash digest
SHA256 ca0b66a1e2b03473758556d3e1b3dd5e4bd26937bc6d91cf11f0d62a62f7b6b3
MD5 31f71c0f64bcffc33d127f48eefd3f03
BLAKE2b-256 6e1effd61327ef6493288b76b652f91118f7532d4d587e35213152960fdcb115

See more details on using hashes here.

Provenance

The following attestation bundles were made for cubie_numba_cuda_mlir-0.4.2.1-cp314-cp314-win_amd64.whl:

Publisher: cubie-wheels.yml on ccam80/numba-cuda-mlir

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file cubie_numba_cuda_mlir-0.4.2.1-cp314-cp314-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for cubie_numba_cuda_mlir-0.4.2.1-cp314-cp314-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 00c640ad899a9b584ec598d486520d13731bce73faa234991ed10e1148f9edc9
MD5 f701e87cfa77a688d8d0b331753c22e3
BLAKE2b-256 df9dd3ff79ccae1c0400e67e85c22cdefe223aa4db9fa0e133f1d864f64e474d

See more details on using hashes here.

Provenance

The following attestation bundles were made for cubie_numba_cuda_mlir-0.4.2.1-cp314-cp314-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl:

Publisher: cubie-wheels.yml on ccam80/numba-cuda-mlir

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file cubie_numba_cuda_mlir-0.4.2.1-cp314-cp314-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for cubie_numba_cuda_mlir-0.4.2.1-cp314-cp314-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 7bba25498c594cad9a7d9a18a11a71529aab7da6ea16148d68565db19ac6bab0
MD5 33eec367961df5a07df14ee4d139fba4
BLAKE2b-256 4e086ae324a5b76b88213924c5158cfd5cb59234600e7a202b6c1c3f8f930d06

See more details on using hashes here.

Provenance

The following attestation bundles were made for cubie_numba_cuda_mlir-0.4.2.1-cp314-cp314-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl:

Publisher: cubie-wheels.yml on ccam80/numba-cuda-mlir

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file cubie_numba_cuda_mlir-0.4.2.1-cp313-cp313-win_amd64.whl.

File metadata

File hashes

Hashes for cubie_numba_cuda_mlir-0.4.2.1-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 d5786576192d568c5a5d66c65b21d7a132e9389b4a65600f7f935e63f9f14887
MD5 1d92f8b38a6d7ef949e695fd30a9fd3b
BLAKE2b-256 f788e2d13ee180f90a90cd08aab092ad1c4ff4f19116002c852a039143b1193c

See more details on using hashes here.

Provenance

The following attestation bundles were made for cubie_numba_cuda_mlir-0.4.2.1-cp313-cp313-win_amd64.whl:

Publisher: cubie-wheels.yml on ccam80/numba-cuda-mlir

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file cubie_numba_cuda_mlir-0.4.2.1-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for cubie_numba_cuda_mlir-0.4.2.1-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 d352712c6a3c87f3b61abc481a4b20a81402b89aa269fac06939392ca063a6e0
MD5 4da6d2d648a69feb5728494412e28e89
BLAKE2b-256 166cc0a3bbeccd1da738d671047cd46922be63c0e6d9ed5b9ca2b587abddf539

See more details on using hashes here.

Provenance

The following attestation bundles were made for cubie_numba_cuda_mlir-0.4.2.1-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl:

Publisher: cubie-wheels.yml on ccam80/numba-cuda-mlir

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file cubie_numba_cuda_mlir-0.4.2.1-cp313-cp313-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for cubie_numba_cuda_mlir-0.4.2.1-cp313-cp313-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 035e3ca3aae8dbc6498d1ab6e23778ff115d7c96b32e73f948c9ee5ee818921b
MD5 6f21c7971468dac739239979f3ca4041
BLAKE2b-256 5d2eb339275b0c4119363f1fb61de1aa41174e9256804ce70ee504772fd374cf

See more details on using hashes here.

Provenance

The following attestation bundles were made for cubie_numba_cuda_mlir-0.4.2.1-cp313-cp313-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl:

Publisher: cubie-wheels.yml on ccam80/numba-cuda-mlir

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file cubie_numba_cuda_mlir-0.4.2.1-cp312-cp312-win_amd64.whl.

File metadata

File hashes

Hashes for cubie_numba_cuda_mlir-0.4.2.1-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 e39cb14114397b80d0e6b8210284d67defca39faa544c1e050e5f60daed313d9
MD5 c36d4fb62e8a4e5b660a5e3e649e6bdb
BLAKE2b-256 4a38fe879d3e1b2860fae206a94d35bc84081172d816a275b77b99dffc788e4c

See more details on using hashes here.

Provenance

The following attestation bundles were made for cubie_numba_cuda_mlir-0.4.2.1-cp312-cp312-win_amd64.whl:

Publisher: cubie-wheels.yml on ccam80/numba-cuda-mlir

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file cubie_numba_cuda_mlir-0.4.2.1-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for cubie_numba_cuda_mlir-0.4.2.1-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 c2c367ce84101ccb72f29afe66445081e61665b3804560ca9ddff3569f0ba31c
MD5 c9948e2406ce18966ac01b25b7b56120
BLAKE2b-256 aeb2216ba4299e9f7d687dbda662697f964b64c95b1dd187bbc844820c801cda

See more details on using hashes here.

Provenance

The following attestation bundles were made for cubie_numba_cuda_mlir-0.4.2.1-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl:

Publisher: cubie-wheels.yml on ccam80/numba-cuda-mlir

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file cubie_numba_cuda_mlir-0.4.2.1-cp312-cp312-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for cubie_numba_cuda_mlir-0.4.2.1-cp312-cp312-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 cbc994285d4e59b48172352b157637fb20bca7574e55167f7efe8dc0094de415
MD5 cc7e60f457f8d406a1a38b961c7f2ed2
BLAKE2b-256 2842a321ae6c58d5e5c56cb91da6275addd7217c15161175eca67feedb097053

See more details on using hashes here.

Provenance

The following attestation bundles were made for cubie_numba_cuda_mlir-0.4.2.1-cp312-cp312-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl:

Publisher: cubie-wheels.yml on ccam80/numba-cuda-mlir

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file cubie_numba_cuda_mlir-0.4.2.1-cp311-cp311-win_amd64.whl.

File metadata

File hashes

Hashes for cubie_numba_cuda_mlir-0.4.2.1-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 79405199b2ae65a72514921a00f3deef5c58bfbbdc526215df6f799dac35d7cd
MD5 8f463f10b7634effac323d873e634052
BLAKE2b-256 c12b3472835b0dbd65813ce7e4299fcaa91764a2bf457adc372d890ad58493b9

See more details on using hashes here.

Provenance

The following attestation bundles were made for cubie_numba_cuda_mlir-0.4.2.1-cp311-cp311-win_amd64.whl:

Publisher: cubie-wheels.yml on ccam80/numba-cuda-mlir

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file cubie_numba_cuda_mlir-0.4.2.1-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for cubie_numba_cuda_mlir-0.4.2.1-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 d6b9bac663a3408516a7541ae246efbbd99c053b605643625b4a6c3400e5d380
MD5 4dec49e9fb63f4152c3b71627cb60cbc
BLAKE2b-256 b99c149d10d9413c84d59ac117e0dac9e89c351eeb81768da10b5a0788d78926

See more details on using hashes here.

Provenance

The following attestation bundles were made for cubie_numba_cuda_mlir-0.4.2.1-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl:

Publisher: cubie-wheels.yml on ccam80/numba-cuda-mlir

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file cubie_numba_cuda_mlir-0.4.2.1-cp311-cp311-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for cubie_numba_cuda_mlir-0.4.2.1-cp311-cp311-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 3eae5bc7cdd0119705535601af72d561fb29e524d3580275e316bf2a14c9f9cc
MD5 a9ee6455d46bc323377cd8fe422dedb8
BLAKE2b-256 fd72c9bef23a4308deb01018dc7767fb0da4163aa6a644a6ba5bff1587ef66d7

See more details on using hashes here.

Provenance

The following attestation bundles were made for cubie_numba_cuda_mlir-0.4.2.1-cp311-cp311-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl:

Publisher: cubie-wheels.yml on ccam80/numba-cuda-mlir

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

0.5.1.1

12 files

0.5.0.1

12 files

0.4.2.4

12 files

0.4.2.3

12 files

0.4.2.2

12 files

This release

0.4.2.1 This release

12 files

0.4.1.2

12 files

0.4.1.1

12 files

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