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.

numba_cuda_mlir-0.4.2-cp314-cp314t-win_amd64.whl (48.5 MB view details)

Uploaded CPython 3.14tWindows x86-64

numba_cuda_mlir-0.4.2-cp314-cp314t-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (71.1 MB view details)

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

numba_cuda_mlir-0.4.2-cp314-cp314t-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl (67.2 MB view details)

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

numba_cuda_mlir-0.4.2-cp314-cp314-win_amd64.whl (48.3 MB view details)

Uploaded CPython 3.14Windows x86-64

numba_cuda_mlir-0.4.2-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

numba_cuda_mlir-0.4.2-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

numba_cuda_mlir-0.4.2-cp313-cp313-win_amd64.whl (47.0 MB view details)

Uploaded CPython 3.13Windows x86-64

numba_cuda_mlir-0.4.2-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

numba_cuda_mlir-0.4.2-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

numba_cuda_mlir-0.4.2-cp312-cp312-win_amd64.whl (47.0 MB view details)

Uploaded CPython 3.12Windows x86-64

numba_cuda_mlir-0.4.2-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

numba_cuda_mlir-0.4.2-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

numba_cuda_mlir-0.4.2-cp311-cp311-win_amd64.whl (47.0 MB view details)

Uploaded CPython 3.11Windows x86-64

numba_cuda_mlir-0.4.2-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

numba_cuda_mlir-0.4.2-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 numba_cuda_mlir-0.4.2-cp314-cp314t-win_amd64.whl.

File metadata

File hashes

Hashes for numba_cuda_mlir-0.4.2-cp314-cp314t-win_amd64.whl
Algorithm Hash digest
SHA256 79dce92255f86a20c89ecb655bb980dc06550e2d5d4adf9e8c3c057ddfbe9cb7
MD5 452c2ad8b15d548a9bc1aed0282e2130
BLAKE2b-256 1f224174185549fe722d0248920092966c551e15b34254ea2f332fc488c2beb7

See more details on using hashes here.

Provenance

The following attestation bundles were made for numba_cuda_mlir-0.4.2-cp314-cp314t-win_amd64.whl:

Publisher: publish.yaml on NVIDIA/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 numba_cuda_mlir-0.4.2-cp314-cp314t-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for numba_cuda_mlir-0.4.2-cp314-cp314t-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 0a9befb226275d35ae69591e1a474dd1c5a1154e437bd0ca07e335957f84ffdb
MD5 08a68a42af10ebb1cd086821b4d2ab5b
BLAKE2b-256 115e2c59c2b554686144730f31938f094626eccac2304f672091368598f6f3bd

See more details on using hashes here.

Provenance

The following attestation bundles were made for numba_cuda_mlir-0.4.2-cp314-cp314t-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl:

Publisher: publish.yaml on NVIDIA/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 numba_cuda_mlir-0.4.2-cp314-cp314t-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for numba_cuda_mlir-0.4.2-cp314-cp314t-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 5378cad861902e3adb3dffd311887ae71484966a89f14ed61261dba5163e9497
MD5 867c91a6b6e580b558ff376751d68fb6
BLAKE2b-256 9d2dffccfea18cc82c50d26b2465d27d8ac7b4909adaa6a0666bd8663fd80628

See more details on using hashes here.

Provenance

The following attestation bundles were made for numba_cuda_mlir-0.4.2-cp314-cp314t-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl:

Publisher: publish.yaml on NVIDIA/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 numba_cuda_mlir-0.4.2-cp314-cp314-win_amd64.whl.

File metadata

File hashes

Hashes for numba_cuda_mlir-0.4.2-cp314-cp314-win_amd64.whl
Algorithm Hash digest
SHA256 aa2cb88195f04caff1025f9c7eba5c7bd3a760a645920c8ef5a9c05d327c3b23
MD5 f0034779cd463762cfb418ed2176a1a3
BLAKE2b-256 7ef03f45fe80affd52a2e524f26a7ddcc3c1434532fdc7780d1b205f1ea5b62a

See more details on using hashes here.

Provenance

The following attestation bundles were made for numba_cuda_mlir-0.4.2-cp314-cp314-win_amd64.whl:

Publisher: publish.yaml on NVIDIA/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 numba_cuda_mlir-0.4.2-cp314-cp314-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for numba_cuda_mlir-0.4.2-cp314-cp314-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 509ba8ba3cae5b9532e151b5e8367328238707e388f42c06e126be249e97b1c6
MD5 668ef0bed269745b2d74ba57b8029622
BLAKE2b-256 d4815cb53e83c7df4a0d49e80e1d982ed8fb4840d72d6d6f73f9f80012c0613b

See more details on using hashes here.

Provenance

The following attestation bundles were made for numba_cuda_mlir-0.4.2-cp314-cp314-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl:

Publisher: publish.yaml on NVIDIA/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 numba_cuda_mlir-0.4.2-cp314-cp314-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for numba_cuda_mlir-0.4.2-cp314-cp314-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 bd6d4869b2055b34da6d4d5b75e332218cc39063b8c1717992617d4b158bc699
MD5 db890d9b6bd79d8991aa7985f4304c51
BLAKE2b-256 37d779b43eacf4b583484ec44e3942dbd5cf18098418d2283d812219a0bda65a

See more details on using hashes here.

Provenance

The following attestation bundles were made for numba_cuda_mlir-0.4.2-cp314-cp314-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl:

Publisher: publish.yaml on NVIDIA/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 numba_cuda_mlir-0.4.2-cp313-cp313-win_amd64.whl.

File metadata

File hashes

Hashes for numba_cuda_mlir-0.4.2-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 ee06505b2416e53a6b4a6ba818a05adc27aaf3e5348b7ee0eb088abab8626fd2
MD5 d356d0be5a48f1d8c37f2664f6d7787d
BLAKE2b-256 afef16a68798b104a51e367252b3b28eb85242f47c5cd8865b443e735ab2f014

See more details on using hashes here.

Provenance

The following attestation bundles were made for numba_cuda_mlir-0.4.2-cp313-cp313-win_amd64.whl:

Publisher: publish.yaml on NVIDIA/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 numba_cuda_mlir-0.4.2-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for numba_cuda_mlir-0.4.2-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 7015180ab077ed98c7e6c0673414084a75b03023ba77a0993ccb905d4c7b6c6a
MD5 fbd5c1b07ae9341b4116fac8aa9ce5d9
BLAKE2b-256 d703fa7df48442bc5ccf6c740c2bbb40bf02b2d81afad4f0e81c5e5a8ffb25d3

See more details on using hashes here.

Provenance

The following attestation bundles were made for numba_cuda_mlir-0.4.2-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl:

Publisher: publish.yaml on NVIDIA/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 numba_cuda_mlir-0.4.2-cp313-cp313-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for numba_cuda_mlir-0.4.2-cp313-cp313-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 53ef22ea71c20da9855b64e09699b2b22821fd8a4a72133a67d7e0c68ccfbf66
MD5 1fc8294ba2d39a626c229000a31631aa
BLAKE2b-256 7b385579160592c71db0bb20e2e75bedb5f638216fe18b727e31218d66574f46

See more details on using hashes here.

Provenance

The following attestation bundles were made for numba_cuda_mlir-0.4.2-cp313-cp313-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl:

Publisher: publish.yaml on NVIDIA/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 numba_cuda_mlir-0.4.2-cp312-cp312-win_amd64.whl.

File metadata

File hashes

Hashes for numba_cuda_mlir-0.4.2-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 9a1e5fb33613ea593d5760ee14d5c957eab7af45d41d57087fc28cc91f37e5d6
MD5 efc4e12af9fe48db0344bf0ec685d3d3
BLAKE2b-256 ebc1377befcb6e1661050b21c92443f6b7cdcb5b239ff5074d6e543db059c265

See more details on using hashes here.

Provenance

The following attestation bundles were made for numba_cuda_mlir-0.4.2-cp312-cp312-win_amd64.whl:

Publisher: publish.yaml on NVIDIA/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 numba_cuda_mlir-0.4.2-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for numba_cuda_mlir-0.4.2-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 d28778383f9bb183598ed3c64c937a8118365f7886ad4330708268595fde48b4
MD5 4089a7c65a3eab981a72edbf9dfb97dd
BLAKE2b-256 2696ae8105560c36a415cdddc7fde1244a15e2d44110a43a87aab0e6dfe1c311

See more details on using hashes here.

Provenance

The following attestation bundles were made for numba_cuda_mlir-0.4.2-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl:

Publisher: publish.yaml on NVIDIA/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 numba_cuda_mlir-0.4.2-cp312-cp312-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for numba_cuda_mlir-0.4.2-cp312-cp312-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 bdbb905463862979bcea23bf308c756b5b456fcca7760239b19721ecc32ec627
MD5 663495e34e92847527b7b6e99ad32088
BLAKE2b-256 19ba5cec4720c9cb087f0f8f70d3b31d070be900bdd51b30c3735bbe3d2f9c89

See more details on using hashes here.

Provenance

The following attestation bundles were made for numba_cuda_mlir-0.4.2-cp312-cp312-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl:

Publisher: publish.yaml on NVIDIA/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 numba_cuda_mlir-0.4.2-cp311-cp311-win_amd64.whl.

File metadata

File hashes

Hashes for numba_cuda_mlir-0.4.2-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 1b86149389247de32437d75a431d2b8cb20a13e36c53348947e79a7400fd13fd
MD5 182962f371cc1d29a8a57f45b782bc9f
BLAKE2b-256 6300e43391a5f1da3d9164c9a13e67e087f045b0ee7222f991cfc1d82d371338

See more details on using hashes here.

Provenance

The following attestation bundles were made for numba_cuda_mlir-0.4.2-cp311-cp311-win_amd64.whl:

Publisher: publish.yaml on NVIDIA/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 numba_cuda_mlir-0.4.2-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for numba_cuda_mlir-0.4.2-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 11eb661ba72893212a6e454dae4a8a66f9831a6080833abfea0c999743f2df7b
MD5 925be9ea28f6be0c195df2b7289b0260
BLAKE2b-256 60eb69ed378f6b51a84945e529a983386a7e9d34158cb7097a8c04e8fad455ac

See more details on using hashes here.

Provenance

The following attestation bundles were made for numba_cuda_mlir-0.4.2-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl:

Publisher: publish.yaml on NVIDIA/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 numba_cuda_mlir-0.4.2-cp311-cp311-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for numba_cuda_mlir-0.4.2-cp311-cp311-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 d366f05c5ea9ca8c3ce85404f3d5688a07813f41fdc39a71b79976f65c2fd7e0
MD5 2944771d2f306f12767652921ea17248
BLAKE2b-256 d7232702c7bab75b53622379a811f17de8a539d032b65d87403de02be2a84ec6

See more details on using hashes here.

Provenance

The following attestation bundles were made for numba_cuda_mlir-0.4.2-cp311-cp311-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl:

Publisher: publish.yaml on NVIDIA/numba-cuda-mlir

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

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page