Registry / ai-ml / nvidia-cublas-cu12

nvidia-cublas-cu12

JSON →
library12.9.2.10pypypiunverified

nvidia-cublas-cu12 provides the native runtime libraries for NVIDIA's CUBLAS (CUDA Basic Linear Algebra Subprograms) on CUDA 12.x enabled systems. It's a GPU-accelerated library designed for high-performance linear algebra operations crucial for AI, machine learning, and high-performance computing (HPC) applications. This Python package acts as a runtime dependency for other Python libraries that leverage cuBLAS functionalities, rather than exposing a direct Python API itself. The current version is 12.9.2.10, and it is actively maintained with frequent updates.

ai-ml
pip install nvidia-cublas-cu12
Install & Compatibility
Where this runs
tested against v12.9.2.10 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
glibc
py 3.10
✕ build_error
3/5 runs
py 3.11
✕ build_error
3/5 runs
py 3.12
✕ build_error
3/5 runs
py 3.13
✕ build_error
3/5 runs
py 3.9
✕ build_error
3/5 runs
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

libcublas
This package does not expose direct Python imports. It provides native shared libraries (e.g., libcublas.so, cublas.dll) that other Python libraries link against.
nvidia-cublas-cu12 is a runtime dependency, not a Python library with direct callable symbols. Its functionality is accessed indirectly by libraries like CuPy or PyTorch.

This package primarily installs native runtime shared libraries, and does not provide a direct Python API for end-user interaction. Its functionality is exposed through higher-level Python wrappers like CuPy or frameworks like PyTorch. The quickstart demonstrates how to verify the installation of the `nvidia-cublas-cu12` package and conceptually shows how a dependent library like CuPy would leverage the underlying CUBLAS functionality if properly set up. For actual usage of cuBLAS operations, refer to the documentation of libraries that wrap cuBLAS (e.g., `nvmath-python`, `CuPy`, `PyTorch`).

import os # nvidia-cublas-cu12 itself does not have direct Python imports or a quickstart. # Its purpose is to provide the underlying shared libraries for other Python packages. # For example, nvmath-python can leverage it. # To use a library that depends on nvidia-cublas-cu12, you'd typically install it like: # pip install nvmath-python[cu12] cupy-cuda12x # Example of how a dependent library (like nvmath-python or CuPy) *might* # indicate the presence of cuBLAS. This code is conceptual, not direct use of this package. # Replace with actual usage from a wrapper library if available and runnable. try: # Attempt to import a library that *uses* cuBLAS if installed import cupy as cp print(f"CuPy version: {cp.__version__}") print(f"CuPy CUDA enabled: {cp.cuda.is_available()}") if cp.cuda.is_available(): a = cp.random.rand(5, 5) b = cp.random.rand(5, 5) c = a @ b # This operation would internally use cuBLAS print(f"CuPy matrix multiplication (via cuBLAS if linked) successful.\nResult shape: {c.shape}") else: print("CuPy is installed but CUDA is not available. Ensure drivers and CUDA runtime are correctly set up.") except ImportError: print("CuPy not installed. Install with `pip install cupy-cuda12x` to test CUDA functionality.") except Exception as e: print(f"An error occurred during CuPy test: {e}") # The presence of `nvidia-cublas-cu12` itself can be verified at the system level. # For direct validation of the package installation: import pkg_resources try: distribution = pkg_resources.get_distribution('nvidia-cublas-cu12') print(f"\nPackage 'nvidia-cublas-cu12' is installed. Version: {distribution.version}") except pkg_resources.DistributionNotFound: print("Package 'nvidia-cublas-cu12' not found. Please install it.")
Debug
Known issues
breakingMajor version numbers (e.g., `cu12` vs. `cu11`) indicate compatibility with specific CUDA Toolkit versions. Mixing `nvidia-cublas-cu12` with libraries compiled for older CUDA versions (e.g., `cu11`) or an incompatible system CUDA toolkit can lead to runtime errors like 'undefined symbols' or 'failed to load shared library'.
fix
Ensure all `nvidia-*cuXX` packages, the system CUDA Toolkit, and any dependent libraries (e.g., PyTorch, TensorFlow, CuPy) are aligned to the same major CUDA version (e.g., CUDA 12.x for `cu12`). Regularly update GPU drivers.
affects: All versions
gotchaThe `pip` wheels for `nvidia-cublas-cu12` are intended for runtime use and do not include developer tools (like `nvcc`) or header files necessary for compiling applications against cuBLAS. For development purposes (e.g., building custom CUDA extensions), a full NVIDIA CUDA Toolkit installation is typically required.
fix
If you need to build applications that link against cuBLAS, install the full NVIDIA CUDA Toolkit appropriate for your system and target CUDA version, in addition to or instead of the PyPI package.
affects: All versions
gotchaWhen using cuBLAS functions within CUDA graphs in cuBLAS 12.x, not explicitly providing a workspace can lead to `cudaErrorNotSupported (801)` due to stream-ordered memory allocations. This is a change from older cuBLAS versions.
fix
Explicitly set a workspace for cuBLAS operations when capturing them in CUDA graphs using `cublasSetWorkspace()`. Refer to the cuBLAS documentation for details on workspace management.
affects: cuBLAS 12.x and later
gotchaIncorrect `LD_LIBRARY_PATH` or `CUDA_HOME` environment variables can prevent Python applications from finding the installed native cuBLAS shared libraries, resulting in 'cannot open shared object file' errors.
fix
Ensure `LD_LIBRARY_PATH` (Linux) or `PATH` (Windows) includes the directory where the native CUDA and cuBLAS libraries are installed. For pip installations, these are typically within the Python environment's `site-packages` directory or a system-wide CUDA installation. `CUDA_HOME` should point to your CUDA installation directory.
affects: All versions
gotchaTesting of CUDA-dependent functionality for `nvidia-cublas-cuXX` may be skipped or incomplete if required libraries like CuPy (e.g., `cupy-cuda12x`) are not installed.
fix
Ensure all necessary runtime and testing dependencies, such as CuPy, are installed in your environment if you intend to fully verify CUDA functionality.
affects: All versions
breakingThe package `nvidia-cublas-cu12` (and similar `nvidia-*cuXX` packages) available on PyPI.org are often placeholder projects. These packages are primarily hosted on the NVIDIA Python Package Index.
fix
To install this package, you must first install `nvidia-pyindex` to configure pip to use the NVIDIA Python Package Index. The correct installation sequence is: `pip install nvidia-pyindex` followed by `pip install nvidia-cublas-cu12`.
affects: All versions
Upgrade
Version history
12.9.2.10latest on PyPI
Audit
Dependencies
nvidia-cuda-nvrtc-cu12requiredRequired base CUDA NVRTC runtime library for CUDA 12.x compatibility.
nvmath-pythonoptionalAn example of a higher-level Python library that can use nvidia-cublas-cu12 as an optional backend for accelerated linear algebra. Requires installing with `[cu12]` extra.
torchoptionalDeep learning frameworks like PyTorch often depend on specific nvidia-*cu12 packages for CUDA acceleration.
Agent activity
11 hits · last 30 days
node
4
seranking-bot
3
ahrefsbot
2
Amazon
1
Resources