Registry / ai-ml / nvidia-mathdx

nvidia-mathdx

JSON →
library25.6.0pypypi✓ verified 79d ago

MathDx is a NVIDIA device library for accelerated math operations on GPUs, providing high-performance implementations for common mathematical functions. Version 25.6.0 is the latest. This package is part of the NVIDIA CUDA ecosystem and is updated frequently with new GPU architectures.

pip install nvidia-mathdx
INSTALL
IMPORT
SIG · NVIDIA-MATHDX
N
nvidia-mathdx
ai-mlpythonv25.6.0
Install
2.4s avg
Import
Disk
137MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v25.6.0 · 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
py 3.103.95 runs
installs and imports cleanly · install 0.0s · import 0.000s · 138.5MB
glibc
py 3.103.95 runs
installs and imports cleanly · install 2.4s · import 0.000s · 139MB
137MB installed
● package 137MB
Code
Verified usage

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

nvidia
import nvidia
import nvidia_mathdx as mathdx

Basic usage showing import pattern and calling an elementwise math function on a CuPy array.

import nvidia_mathdx as mathdx import cupy as cp # Create a CuPy array a = cp.array([1.0, 2.0, 3.0, 4.0]) # Use mathdx elementwise math (example: sin) b = mathdx.sin(a) print(b)
Debug
Known issues
breakingThe package was originally distributed as a single module; in recent versions it has been split into subpackages (e.g., nvidia_mathdx.fft, nvidia_mathdx.linalg). Old code importing `nvidia_mathdx` directly may break if relying on functions that moved.
fix
Update imports to use subpackages: e.g., `from nvidia_mathdx.fft import fft`.
affects: >=24.12.0
gotchaThe function `mathdx.sin` may return a GPU array that is not automatically synchronized with the host. Accessing `.get()` on the result without explicit synchronization can cause segmentation faults.
fix
Use `cp.cuda.Stream.null.synchronize()` before reading results back to host, or use CuPy's default synchronization.
affects: all
deprecatedThe top-level function `mathdx.matrix_inverse` is deprecated in favor of `mathdx.linalg.inv`.
fix
Replace calls to `mathdx.matrix_inverse` with `mathdx.linalg.inv`.
affects: >=25.03.0
Upgrade
Version history
25.6.0latest on PyPI · released Nov 13, 2025
Audit
Dependencies
cupy-cuda12xoptionalMathDx often depends on CuPy for array operations and GPU context.
nvidia-cuda-runtime-cu12optionalRequired for CUDA runtime if using MathDx kernels directly.
Agent activity
2 hits · last 30 days
node
2
Resources
nvidia-mathdx — pip install nvidia-mathdx · libregistry