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.1-cp314-cp314t-win_amd64.whl (48.5 MB view details)

Uploaded CPython 3.14tWindows x86-64

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

Uploaded CPython 3.14Windows x86-64

numba_cuda_mlir-0.4.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

numba_cuda_mlir-0.4.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

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

Uploaded CPython 3.13Windows x86-64

numba_cuda_mlir-0.4.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

numba_cuda_mlir-0.4.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

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

Uploaded CPython 3.12Windows x86-64

numba_cuda_mlir-0.4.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

numba_cuda_mlir-0.4.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

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

Uploaded CPython 3.11Windows x86-64

numba_cuda_mlir-0.4.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

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

File metadata

File hashes

Hashes for numba_cuda_mlir-0.4.1-cp314-cp314t-win_amd64.whl
Algorithm Hash digest
SHA256 55e1dae388bc2b48dea89cbc4ccce4e73740371cd97ea96179b2e9c98f0a3e42
MD5 94e0b0c376b7a3fe45515529ad49d5f5
BLAKE2b-256 c42322a678db35999ba3feaa7306cbaa5f86716400acebc4df2912b2bc610007

See more details on using hashes here.

Provenance

The following attestation bundles were made for numba_cuda_mlir-0.4.1-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.1-cp314-cp314t-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for numba_cuda_mlir-0.4.1-cp314-cp314t-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 a9bfcd0c85d8ad46bd8899fb808ec627d9eb45e2bcacb45209abde7025026884
MD5 dd69aacfd1ddc9ada44eba1ddd5689a3
BLAKE2b-256 9a90b844d0c513fe88d61e7c3bb1acf4764701597ee5146540a26e28acf91f5f

See more details on using hashes here.

Provenance

The following attestation bundles were made for numba_cuda_mlir-0.4.1-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.1-cp314-cp314t-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for numba_cuda_mlir-0.4.1-cp314-cp314t-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 4152e18b611d1ed4fa5d5276bbcde2f92e60d77f9dc6df94b72f9b7370cbc986
MD5 342c9529b347fd35571563425facd4bb
BLAKE2b-256 775a8960bbcc1d138171efcefe69c0ef3ab56c2f62e3e6214f41995e4f78b5ae

See more details on using hashes here.

Provenance

The following attestation bundles were made for numba_cuda_mlir-0.4.1-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.1-cp314-cp314-win_amd64.whl.

File metadata

File hashes

Hashes for numba_cuda_mlir-0.4.1-cp314-cp314-win_amd64.whl
Algorithm Hash digest
SHA256 2e7339f7f1f49ab679e83c940a5e2d5262d450a03d492840f60bb168d8a44eee
MD5 302adac4ded66f615d0be255fcb26adb
BLAKE2b-256 1af4b2956398a6adcf10706f32c4cbc619c6f2003060cf57eaf54bf7774ff512

See more details on using hashes here.

Provenance

The following attestation bundles were made for numba_cuda_mlir-0.4.1-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.1-cp314-cp314-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for numba_cuda_mlir-0.4.1-cp314-cp314-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 18f7dd545bbcd73a2c08178554255bbb07b8d200a426a096371708fd45c8d74f
MD5 1aa952ace3ee253e97fa5e4c4ec7980a
BLAKE2b-256 db1a3ab1931ac7704334c8f54ac305d5544a4151183be99476eb7656a1239091

See more details on using hashes here.

Provenance

The following attestation bundles were made for numba_cuda_mlir-0.4.1-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.1-cp314-cp314-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for numba_cuda_mlir-0.4.1-cp314-cp314-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 ad751eb7a1bb9a877da7d89039831429822fe2e2107763b8e4359e7c34d21872
MD5 6dd57bca0ac5d4c4b5a82124926d7c79
BLAKE2b-256 acfd07d232b953f089e931257a67c273e8ce217b33fb97edcd7758f78b64a6d0

See more details on using hashes here.

Provenance

The following attestation bundles were made for numba_cuda_mlir-0.4.1-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.1-cp313-cp313-win_amd64.whl.

File metadata

File hashes

Hashes for numba_cuda_mlir-0.4.1-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 b1c25d4c944d672db315374e26ddc03b31bf8bc0e09906a051546c975f296f02
MD5 7a0be7d7444669c08fe55292ec405b38
BLAKE2b-256 fe43ea8dc7fe257acabff5ccd8dc0aba791238ccae9228e1e3b42fe09f878ce5

See more details on using hashes here.

Provenance

The following attestation bundles were made for numba_cuda_mlir-0.4.1-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.1-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for numba_cuda_mlir-0.4.1-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 5567a0473b933c9d523320d6cb01d12c7316062779b6718292b61edf1552441a
MD5 9ad86a18863e98e9d8f73ef499cc1269
BLAKE2b-256 906f0841e70c0c258c20dbea1e9678de973c320f1850b1ece5f44e083aed43df

See more details on using hashes here.

Provenance

The following attestation bundles were made for numba_cuda_mlir-0.4.1-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.1-cp313-cp313-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for numba_cuda_mlir-0.4.1-cp313-cp313-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 ec6df7a3ed2d88f7c43338a8c910cfdb1f40b6154d8b4f4aaec8b0195ac06f5a
MD5 66cc750e9d65b85b457009e20fc3cb68
BLAKE2b-256 8d32d5a0a0e4a34fde84fe179838ad634ff44944bf7407699062c69b01530c64

See more details on using hashes here.

Provenance

The following attestation bundles were made for numba_cuda_mlir-0.4.1-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.1-cp312-cp312-win_amd64.whl.

File metadata

File hashes

Hashes for numba_cuda_mlir-0.4.1-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 51879a6f126a175f444219d1a353c2c407f3da1fed593da67326d32a1051d281
MD5 999daa9938f407fb731a5212e27dfbae
BLAKE2b-256 d9fd6ebdf9cce201120eba3363f5d15ddbca6a32740f6791454be4ef200b34eb

See more details on using hashes here.

Provenance

The following attestation bundles were made for numba_cuda_mlir-0.4.1-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.1-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for numba_cuda_mlir-0.4.1-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 6f58f460e0809bae5e61b2e7933de3b38d4678996bb089faecc2e583f257c983
MD5 f70149a2ee36289c559e3166d3b038c7
BLAKE2b-256 ad952cb7992d73f38e054b00ad4293da8c81549d8e91c5c8c82bab30003b1950

See more details on using hashes here.

Provenance

The following attestation bundles were made for numba_cuda_mlir-0.4.1-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.1-cp312-cp312-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for numba_cuda_mlir-0.4.1-cp312-cp312-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 1b3266a4ff010105ba6b18c6c7e8016413c752b693c5fa7f7b232bcd249c77ac
MD5 bc75a71e480bfda33e9bfafec9dea457
BLAKE2b-256 0011fc5248465cb5039afdb8bf46acd2d49834f8bee04aaadedeb0e050d4ce4e

See more details on using hashes here.

Provenance

The following attestation bundles were made for numba_cuda_mlir-0.4.1-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.1-cp311-cp311-win_amd64.whl.

File metadata

File hashes

Hashes for numba_cuda_mlir-0.4.1-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 b9930626cadb803f40df33f0dd9a392ce1d09facf8ae098a8320bf4df6b56fbc
MD5 6e358af0bb5604c1101cb81ebcab8a61
BLAKE2b-256 a04c92d4e3a2fdccf47b021241b4b5b68d7c360fb85c8b43faa7702f4d2d03d0

See more details on using hashes here.

Provenance

The following attestation bundles were made for numba_cuda_mlir-0.4.1-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.1-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for numba_cuda_mlir-0.4.1-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 4edb59cb5874e8dcd665dda2818af33909a9c4af790701f370232ee3a714a681
MD5 9c138932b6ed4f0c2ca477050b1721a9
BLAKE2b-256 b0dd9946bdcd46522f25b2f27ddd50168fe0e4a80c57a069c0f15afe02b65830

See more details on using hashes here.

Provenance

The following attestation bundles were made for numba_cuda_mlir-0.4.1-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.1-cp311-cp311-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for numba_cuda_mlir-0.4.1-cp311-cp311-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 9b7cf67d77b01a619d92121d54030ee8e97f94288c3c512b89294af8b633b7d4
MD5 cca1d97920dbde76ad07d7abb4d9230c
BLAKE2b-256 420e1751418fad7b5dbc9e85043ea3b1224766d6b1a0761459c70b190bbe0fd1

See more details on using hashes here.

Provenance

The following attestation bundles were made for numba_cuda_mlir-0.4.1-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