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, 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:

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

Uploaded CPython 3.14Windows x86-64

cubie_numba_cuda_mlir-0.5.1.1-cp314-cp314-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (71.2 MB view details)

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

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

Uploaded CPython 3.13Windows x86-64

cubie_numba_cuda_mlir-0.5.1.1-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (71.2 MB view details)

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

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

Uploaded CPython 3.12Windows x86-64

cubie_numba_cuda_mlir-0.5.1.1-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (71.2 MB view details)

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

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

Uploaded CPython 3.11Windows x86-64

cubie_numba_cuda_mlir-0.5.1.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.5.1.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.5.1.1-cp314-cp314-win_amd64.whl.

File metadata

File hashes

Hashes for cubie_numba_cuda_mlir-0.5.1.1-cp314-cp314-win_amd64.whl
Algorithm Hash digest
SHA256 46af8204010f957f8068744119112e93f432f478df04944ce2013eae6b544610
MD5 e7fd8ffe0b351faea08934627be09c46
BLAKE2b-256 e183de197bc0fba459294a01c70ada8a561b74ef9c540ee38b2f84251ac2bb02

See more details on using hashes here.

Provenance

The following attestation bundles were made for cubie_numba_cuda_mlir-0.5.1.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.5.1.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.5.1.1-cp314-cp314-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 47136ee73e68d166d91c9eaff9587fe2ffe1bc33a940efa3f86cdde9466aa4aa
MD5 1aff7a53d033160d7cbe5648021e5da6
BLAKE2b-256 697b42a958fd530bb0d1bde211f312efa3d64588df30899b5903ae2fa07c0a8a

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for cubie_numba_cuda_mlir-0.5.1.1-cp314-cp314-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 99a1732e02ebda6a6a59ae139e4a4ba63ef8c512545eef9dfe705e8d65a9e012
MD5 a18fd33c453cef3f66fc1bb9351982e3
BLAKE2b-256 5b91c7db9281e873b63b7aedbb0820b1c074bc17054bbe5ff5ff26776e54561a

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for cubie_numba_cuda_mlir-0.5.1.1-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 16a21be5f2abab5d4aeb6f831554d2eebe4e80cc860b92ddfd29df7e21cf2ae6
MD5 3c034f62372615acd99e1081c9173308
BLAKE2b-256 36035c865dcd6b08135d3e8ec8515b7a2d7dfd86cc11ee5e21b4489502dfb497

See more details on using hashes here.

Provenance

The following attestation bundles were made for cubie_numba_cuda_mlir-0.5.1.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.5.1.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.5.1.1-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 c83af98aaf63cbe45b0030949d404d63b18ab638bce4084827d3f547943ac16c
MD5 c6152ccd2a62f201a2abde96bf7cb636
BLAKE2b-256 247043f731b708ebaea3fe70cb6ef7d9bd82670fe7b9921d8f4788d7fa4909e1

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for cubie_numba_cuda_mlir-0.5.1.1-cp313-cp313-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 47d92b7e9806da9983d8345430e8190cd04c19218dd59fe7c39ca3483e20fc6f
MD5 64d40fc6660cc8e0156c1f2a9141d2a1
BLAKE2b-256 f5080bf41c8f9881e2d0a312d3f7984f06d17923627705251ed9c84a5789a4e7

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for cubie_numba_cuda_mlir-0.5.1.1-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 7ec7deee3a611c32bc24aa7bfc88c176ab6c95b21733b1437d8a7b1b301dc83c
MD5 e7b6409ecb3c0b1fe6f66349b5ae04b1
BLAKE2b-256 d874c1cd8126683d60a64c94b5b044761701305b51e7f169e228041d028fd83c

See more details on using hashes here.

Provenance

The following attestation bundles were made for cubie_numba_cuda_mlir-0.5.1.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.5.1.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.5.1.1-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 aaa41cb4d9e1bc47d29b81c7d14765e850d0f428822c186330b522171769cb47
MD5 409a28ec3027a4f4909f32f587fb7923
BLAKE2b-256 9a3ebb25b8371990a8372b072ec990559e2715d957e5ebc1ab26daf05f08d226

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for cubie_numba_cuda_mlir-0.5.1.1-cp312-cp312-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 6679c55e0b7ca8667c1c8e74925cb2749165402551a1b5a7ddcc060da7738006
MD5 23a392ddb9b2165786cac72ea5d5f7ca
BLAKE2b-256 2b94fabca3812022b863ca94cc6522fd88599c4371f4192d4b3bb0f32c3da299

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for cubie_numba_cuda_mlir-0.5.1.1-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 91f27d5feef3d448f83c9ec88891593b58b25746fcba3ac75d1852203ba1cde9
MD5 52a0c471a58a5973d558d79db4714433
BLAKE2b-256 13b0b9ab8e4d3ddde1ad2645d7c329ccacdbceb5f7cdff4bf9530796a1a76c5a

See more details on using hashes here.

Provenance

The following attestation bundles were made for cubie_numba_cuda_mlir-0.5.1.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.5.1.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.5.1.1-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 e48f2abdcc75125770a5c90b2cf94af07ad69f06095fcf10c0ee283243a70635
MD5 c713a7f23b6cd4d3564fc65d34567b88
BLAKE2b-256 082f215c743b14776785f38572db513a5be9843aa134a839c9595ad9e97c7736

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for cubie_numba_cuda_mlir-0.5.1.1-cp311-cp311-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 9d4214ede9e5c1d23cad17d622ac38ba2d0f81a35c9c598601732b5b59a4818d
MD5 459dcf8c33ba56b72bf65cbea3fe52f7
BLAKE2b-256 edcebc0673b40f74b4175dc5de38c92f7e0dd6155a1abaaa6741b5ec2247e94a

See more details on using hashes here.

Provenance

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

This release

0.5.1.1 This release

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

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