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.3-cp314-cp314-win_amd64.whl (48.3 MB view details)

Uploaded CPython 3.14Windows x86-64

cubie_numba_cuda_mlir-0.4.2.3-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.3-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.3-cp313-cp313-win_amd64.whl (47.0 MB view details)

Uploaded CPython 3.13Windows x86-64

cubie_numba_cuda_mlir-0.4.2.3-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.3-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.3-cp312-cp312-win_amd64.whl (47.0 MB view details)

Uploaded CPython 3.12Windows x86-64

cubie_numba_cuda_mlir-0.4.2.3-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.3-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.3-cp311-cp311-win_amd64.whl (47.0 MB view details)

Uploaded CPython 3.11Windows x86-64

cubie_numba_cuda_mlir-0.4.2.3-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.3-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.3-cp314-cp314-win_amd64.whl.

File metadata

File hashes

Hashes for cubie_numba_cuda_mlir-0.4.2.3-cp314-cp314-win_amd64.whl
Algorithm Hash digest
SHA256 65928f23f559acc63b9ea158dce44e5d8c6052859752cf8fffa274f422530f82
MD5 a211cdc69eb5a803dc9ca559db19d20b
BLAKE2b-256 5d02e8bba2926d94c8985e50761c7a5f7b1daac14b9737cde280f66f6a0d6a26

See more details on using hashes here.

Provenance

The following attestation bundles were made for cubie_numba_cuda_mlir-0.4.2.3-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.3-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.3-cp314-cp314-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 a0076fd92a10092084f2512d8f609d67509811c448cb43246f901f2a54330f6e
MD5 23ace8986644fa1a78e70e4ebb60a0e7
BLAKE2b-256 69a487abb1a7e72cb89ae1dd4057b1bbfc38c4b5d4a171a6da38962007d8ee38

See more details on using hashes here.

Provenance

The following attestation bundles were made for cubie_numba_cuda_mlir-0.4.2.3-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.3-cp314-cp314-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for cubie_numba_cuda_mlir-0.4.2.3-cp314-cp314-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 ce28deadd0373c07df7452a1ebef148699acd97fa9e1fb93669a03757b374f53
MD5 568ef05b5e36720617820b61fa2b73c9
BLAKE2b-256 edc840c0d1cf06efc7ee8312f52afa3da104f57a3438923b4780e97e6476a9e8

See more details on using hashes here.

Provenance

The following attestation bundles were made for cubie_numba_cuda_mlir-0.4.2.3-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.3-cp313-cp313-win_amd64.whl.

File metadata

File hashes

Hashes for cubie_numba_cuda_mlir-0.4.2.3-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 5e81310fdc20addd0d13fa88a699dec0c527705f056a6712a308d20e31f07389
MD5 0a14aafdd4fd430f052ef16ff20bf2c3
BLAKE2b-256 a8e73b6bc11c9d0b01c5846bac76ef768058105a6141fab65ff05db4f0d4fbae

See more details on using hashes here.

Provenance

The following attestation bundles were made for cubie_numba_cuda_mlir-0.4.2.3-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.3-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.3-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 0aecb0f09c667b149db34db17f2437baac3dbd8efc12b9f0108a2e20c96cbf6d
MD5 73439c9898a4bc9b521b991af22a38dc
BLAKE2b-256 c559a604fe9b6b3e641de0584b83f02952eeb910ac4c98477f6dd7cbb86effb1

See more details on using hashes here.

Provenance

The following attestation bundles were made for cubie_numba_cuda_mlir-0.4.2.3-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.3-cp313-cp313-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for cubie_numba_cuda_mlir-0.4.2.3-cp313-cp313-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 0f54efd6fc78d306eb593bbc093c6ab53592e28c4704bf4aaa903c78e86b3b9c
MD5 f47ccdd0262c9a0776ce85c0be0a7c92
BLAKE2b-256 ba226beaed2d6c5ce0d7613b49b79960c94d795b8d19191f8206f5f6577d83b6

See more details on using hashes here.

Provenance

The following attestation bundles were made for cubie_numba_cuda_mlir-0.4.2.3-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.3-cp312-cp312-win_amd64.whl.

File metadata

File hashes

Hashes for cubie_numba_cuda_mlir-0.4.2.3-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 816f929713072130dcce63ee0d4cfc64e9f0d8b35e868638959fdbda21b24688
MD5 8b66aa49e374a35aed6e82715eab005a
BLAKE2b-256 77ed8f1ee03a1bb9cd4c1d0cbc7435abee9df9b2b7e83feef03d3aa0cbadd8df

See more details on using hashes here.

Provenance

The following attestation bundles were made for cubie_numba_cuda_mlir-0.4.2.3-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.3-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.3-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 7056216ee713212d896a03059b9d857ee680d7731c95c2e880529bb52709593c
MD5 d669f81528701fe9830fb04d67fad54a
BLAKE2b-256 a972c6762f1ee95fcf395051d5319d55e3a3f9e2ee46588fda1ae9af26ab9c0c

See more details on using hashes here.

Provenance

The following attestation bundles were made for cubie_numba_cuda_mlir-0.4.2.3-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.3-cp312-cp312-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for cubie_numba_cuda_mlir-0.4.2.3-cp312-cp312-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 888b753a5c7bfed2e3dcefab795cb6ff422a2401f5ce941566ed8c36cf34b4f9
MD5 5a0b364ff65f003bde51ff098b7da1a3
BLAKE2b-256 cbbea3095a42154b45354f005dbf75cf8872152944d5e275fc89da5b04bc6865

See more details on using hashes here.

Provenance

The following attestation bundles were made for cubie_numba_cuda_mlir-0.4.2.3-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.3-cp311-cp311-win_amd64.whl.

File metadata

File hashes

Hashes for cubie_numba_cuda_mlir-0.4.2.3-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 bca7f921f3b91a168cef2614002244f2f32d1be2df72a546ebb30c99923b5050
MD5 f5ef98e49b2d348b368396f265f1ce8c
BLAKE2b-256 3e35d77e60340a1c618b244770a6771803892e19660a1c612e62545c47f71969

See more details on using hashes here.

Provenance

The following attestation bundles were made for cubie_numba_cuda_mlir-0.4.2.3-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.3-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.3-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 419de6a6fe26e4420a4e56abbd399e2e90fd93e78fa0e5b924395d5e25e7257f
MD5 a26d3918c1b08037ff757447aeaad6f2
BLAKE2b-256 d463daa9c429a7e1f905745837f8cb67708c8c2188d17151c8672e40e5b07f3d

See more details on using hashes here.

Provenance

The following attestation bundles were made for cubie_numba_cuda_mlir-0.4.2.3-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.3-cp311-cp311-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for cubie_numba_cuda_mlir-0.4.2.3-cp311-cp311-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 86bd7af3253f7774b58355d7ddd2c08e3210552b099621712470cf555e40f519
MD5 809abd2d25a201f7a0f9457547ae6a97
BLAKE2b-256 73de953db95afd8bf3d913972ccfb38543201a9ce14b898ec779a36e1fa82b40

See more details on using hashes here.

Provenance

The following attestation bundles were made for cubie_numba_cuda_mlir-0.4.2.3-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

This release

0.4.2.3 This release

12 files

0.4.2.2

12 files

0.4.2.1

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