Skip to main content

numba-cuda-mlir Python Compiler (CuBIE patched build)

Project description

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.

Project details


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

Uploaded CPython 3.14Windows x86-64

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

Uploaded CPython 3.13Windows x86-64

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

Uploaded CPython 3.12Windows x86-64

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

Uploaded CPython 3.11Windows x86-64

cubie_numba_cuda_mlir-0.4.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.4.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.4.1.1-cp314-cp314-win_amd64.whl.

File metadata

File hashes

Hashes for cubie_numba_cuda_mlir-0.4.1.1-cp314-cp314-win_amd64.whl
Algorithm Hash digest
SHA256 cfead8bef5959ad1ebc55bcada344c462598909af7f0d922145a37e60bd0b73d
MD5 6a081d9145257b3e10416236c8d91fd1
BLAKE2b-256 5feb2f6929f406c73e11743c1a04e1d4c4ce22773a339d903f8d5b301c3b4173

See more details on using hashes here.

Provenance

The following attestation bundles were made for cubie_numba_cuda_mlir-0.4.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.4.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.4.1.1-cp314-cp314-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 3905e163d5cdaa895ae239ea9ff14e482d6eaffd842cddca1f96468e244c2604
MD5 512794c9c5bbbde653b76ea306de5214
BLAKE2b-256 b0adfa1e69286ea6d12e509816152a220fb0a4d7da68d3d215ff0bcb68d92e15

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for cubie_numba_cuda_mlir-0.4.1.1-cp314-cp314-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 64a4252f4e12c2a3d4dba29a52a761377fffdb8c9d51d256ece245610307020b
MD5 e934d457d457e2e977d548b17483f3d3
BLAKE2b-256 6bf9e5918a1754f6e0852549ce7e0578cefe7144c7377341373f996894ebaf52

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for cubie_numba_cuda_mlir-0.4.1.1-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 c91d64b286ae9ab59ca2b64d6604924f3b380127ffdeb84a28630ee92b56c63e
MD5 d25ee8364de45093eac36fd9bb0d1978
BLAKE2b-256 8f6a06d7aaf84f8f149e4ac6bd1f069119faf246927cc54cb78e99b355cd798e

See more details on using hashes here.

Provenance

The following attestation bundles were made for cubie_numba_cuda_mlir-0.4.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.4.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.4.1.1-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 209c39a0fce89c8d104b635fc9b8e40bb8493fab37fc6f57de027b3ddb41602a
MD5 51ccf1f825ea960d11b3dc671674ed9e
BLAKE2b-256 9e45ce6a4138e582b92106761f1baf2b95cfdf6748f1cf733b1d5a1ac5c8334d

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for cubie_numba_cuda_mlir-0.4.1.1-cp313-cp313-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 2b392d22f6a293a79b024fb9a587703eabe372f8dedde584a06345c84a100ffd
MD5 6c7b59abd6ab1f3002a3b71121c1bdab
BLAKE2b-256 86a5489ef62ed42ed9be808c119f175c5f849a04e6a8cca106242e40277d18ba

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for cubie_numba_cuda_mlir-0.4.1.1-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 8500e58f062da87dd960f75036d88409019bf38e2a17a17121c012b9d495a8b5
MD5 99ca116b74658985e59900f706759464
BLAKE2b-256 47cb02e900a2cba487ef89ac82afa93d218e2291412a4791b66ee01a77b4e67a

See more details on using hashes here.

Provenance

The following attestation bundles were made for cubie_numba_cuda_mlir-0.4.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.4.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.4.1.1-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 4666b0ed3ff54f197a46f86df150512981fd4846ba540aaf169184a338329d4b
MD5 ec08f05cce8fdd0ddf9cfe975daa010a
BLAKE2b-256 bd28039306c21af9be1f2ddb4e040297f146e9a268b1e75d92ca25f356dedaed

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for cubie_numba_cuda_mlir-0.4.1.1-cp312-cp312-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 93fe65a2a1f4e26941528e61311266853e9fc9eaa6c891a23a01e97687f468eb
MD5 ff5fda92c12f6c6f51c6a50ded6508f8
BLAKE2b-256 a967b23e50530f0db145ceac86a3686039fc146dfa916d2bf3fe480fae9dd5b9

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for cubie_numba_cuda_mlir-0.4.1.1-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 750e6e94291a94789d565bd56294aac8ca0af50aebbb32a0914f2fac2f4a972e
MD5 e2a16d9db4f86ab9b5ebd93af89b339e
BLAKE2b-256 88de6e5f1f41cd85b300d39cd9776e9b2ee73b0d8ef72b110d3753bc68ffce4e

See more details on using hashes here.

Provenance

The following attestation bundles were made for cubie_numba_cuda_mlir-0.4.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.4.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.4.1.1-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 439ec21287e6165ca623ecb11f2de065936d42fbd115a74d3d3843be0fdbe707
MD5 81cc4dae201dae490538a4573af65238
BLAKE2b-256 174e58340f9b0e8fa9f6a9d48e1566aab6cb94200a31401dd9431a54e9e32c90

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for cubie_numba_cuda_mlir-0.4.1.1-cp311-cp311-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 59c56f3ea67de0d38b9e85b7b697526bcc2dd85e5cf6a7899735d625ebe816f4
MD5 a9ab38c2b1959c2d31475e67bbb13f5c
BLAKE2b-256 ebda7137674fdbeba2f0589c5a5d6997945a64673b9108937ebd27c16b20e9b5

See more details on using hashes here.

Provenance

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

Supported by

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