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

Uploaded CPython 3.14Windows x86-64

cubie_numba_cuda_mlir-0.4.1.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

cubie_numba_cuda_mlir-0.4.1.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

cubie_numba_cuda_mlir-0.4.1.2-cp313-cp313-win_amd64.whl (47.0 MB view details)

Uploaded CPython 3.13Windows x86-64

cubie_numba_cuda_mlir-0.4.1.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

cubie_numba_cuda_mlir-0.4.1.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

cubie_numba_cuda_mlir-0.4.1.2-cp312-cp312-win_amd64.whl (47.0 MB view details)

Uploaded CPython 3.12Windows x86-64

cubie_numba_cuda_mlir-0.4.1.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

cubie_numba_cuda_mlir-0.4.1.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

cubie_numba_cuda_mlir-0.4.1.2-cp311-cp311-win_amd64.whl (47.0 MB view details)

Uploaded CPython 3.11Windows x86-64

cubie_numba_cuda_mlir-0.4.1.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

cubie_numba_cuda_mlir-0.4.1.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 cubie_numba_cuda_mlir-0.4.1.2-cp314-cp314-win_amd64.whl.

File metadata

File hashes

Hashes for cubie_numba_cuda_mlir-0.4.1.2-cp314-cp314-win_amd64.whl
Algorithm Hash digest
SHA256 5a14be353020143d2aa668398c1e0de56235d7d9bc790745bf10452ab0ebe3dc
MD5 8236d1eae4d7bca2c3028a12f2678e91
BLAKE2b-256 7323fbabbd1fd89703c0c30b6f05b90e0bd405128b745ea375a8c077d27f1f11

See more details on using hashes here.

Provenance

The following attestation bundles were made for cubie_numba_cuda_mlir-0.4.1.2-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.2-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.2-cp314-cp314-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 4db85bae21bf9f8eeba4d1b035a1dc2cea416781c5aa604d32664a3db1287878
MD5 dfbc87e7cd686aab49d7547e51cbe5c5
BLAKE2b-256 dd8d21da80a8277b7cfc95ed3bcfab0abe496480f51faedf4e2607d72fb87ff6

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for cubie_numba_cuda_mlir-0.4.1.2-cp314-cp314-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 0b042a636e9987a3240c6aa9571f38a65de4c085defa288de8a4820475f1708e
MD5 e96f3a5a803289caa0e613161aa7983b
BLAKE2b-256 3657bd3f197909b3cb8be79ba88a6caf0af4ea47ab9212657e02068cde8b5040

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for cubie_numba_cuda_mlir-0.4.1.2-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 d2710461956398ccea45291398b028511ff133cf486b0ab32a0b5c80aea7a3bf
MD5 482bc16ae9e9bc9838e3aa0ddeca1f5f
BLAKE2b-256 2e559de25ccef4a5b668ab164d9e9efa2219043bc780c7bfaa1053ee3f458162

See more details on using hashes here.

Provenance

The following attestation bundles were made for cubie_numba_cuda_mlir-0.4.1.2-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.2-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.2-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 c7837287d3cd0ee354557f0aafb863e66c5a940c21878420039e962e07cb40c6
MD5 7cdccf53b53dd504946f69de397ef5c2
BLAKE2b-256 1d95bb62f82a1d0990396959cab4595c6dfa00e072294af91b1f91b76cbcd658

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for cubie_numba_cuda_mlir-0.4.1.2-cp313-cp313-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 8194a8fdaeafaa8fc9a6ac552b7a1954b7e0c1e8571dffc300a72b0d909d42b7
MD5 a7d1eea0fb8b9ccfcb9f720b2d4e1543
BLAKE2b-256 ed2049f9d24d747f1e5026e49f29d7c0f4dc0025248f2e13d1dd588609fa93be

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for cubie_numba_cuda_mlir-0.4.1.2-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 fd74cecd075c07e85416e3d08270b5edf4deb05bba3f358d84f260ad12bc0ae2
MD5 7988dcb5f300d3a4e2e94c4752f5ba58
BLAKE2b-256 315b1d9da23369d31cc4723d9e11c1132402521056700cb1ce22131f73b8c8e9

See more details on using hashes here.

Provenance

The following attestation bundles were made for cubie_numba_cuda_mlir-0.4.1.2-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.2-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.2-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 f529eeff2b0e411299cf058772dd40b9c3db08d02fb31ab012140234d2b1b20c
MD5 7a32f1915955b06a4505b7efe862a8d6
BLAKE2b-256 c49382b87f5b9eed123793ef9a69ffd2d8cd6c84b0efdf261ea10dedc2a62b8e

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for cubie_numba_cuda_mlir-0.4.1.2-cp312-cp312-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 132528a55c38eadad9130b356a9a99e2d2e4a796618e25b356c22933c562ec12
MD5 3efce053b03c0443ce4166470d47049a
BLAKE2b-256 2e72d0472cc3dac5a0cc0efbf02c506065e40d501a7669a2553060e15f9df167

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for cubie_numba_cuda_mlir-0.4.1.2-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 f6b07518db177107ecacdf57a7bc4f22847712053c5834e9ff226339788ac97b
MD5 e4a019d7285b758a1d27f3be3a433753
BLAKE2b-256 0cb79b2a153adaa2d2bdcb4d2d5866736d54c6a27ec077f0016a15798efdb31d

See more details on using hashes here.

Provenance

The following attestation bundles were made for cubie_numba_cuda_mlir-0.4.1.2-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.2-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.2-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 d332251830b8b9acb703fc19a91a133b38549a699672531b126b3d3c4cfc1d59
MD5 3620528cdf49e336d48747cdb9c516e0
BLAKE2b-256 385dfc26cab47e83f637b4a9f33f879b0f693639388c2aa0593a0c30344e14eb

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for cubie_numba_cuda_mlir-0.4.1.2-cp311-cp311-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 ec5ff8f42698376e449bcf32ab6edc9e89249f384698d7104273989679fd844e
MD5 476a826ce1e32e37fdd9c602ebeb3418
BLAKE2b-256 92600c20fc94a4937db8594dc345665b0e965f73e80eb29d034c55ad3766a85e

See more details on using hashes here.

Provenance

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