{"library":"nvidia-cufft","title":"NVIDIA cuFFT","description":"The `nvidia-cufft` package provides the NVIDIA CUDA Fast Fourier Transform (cuFFT) native runtime libraries for Python environments. It is not a Python API itself, but rather a low-level dependency for other Python libraries (like CuPy, PyTorch, or TensorFlow) that leverage cuFFT for GPU-accelerated FFT computations. The current version is 12.2.0.37, and new versions are typically released in conjunction with NVIDIA CUDA Toolkit updates.","language":"python","status":"active","last_verified":"Thu Apr 09","install":{"commands":["pip install nvidia-cufft"],"cli":null},"imports":[],"auth":{"required":false,"env_vars":[]},"quickstart":{"code":"import cupy as cp\nimport cupy.fft as cufft\n\n# Ensure CUDA is available and nvidia-cufft binaries are usable by CuPy\nif not cp.cuda.is_available():\n    print(\"CUDA is not available. CuPy cannot use cuFFT.\")\nelse:\n    print(f\"CuPy version: {cp.__version__}\")\n    print(f\"CUDA driver version: {cp.cuda.runtime.getDriverVersion()}\")\n    print(f\"CUDA runtime version: {cp.cuda.runtime.get_version()}\")\n\n    # Example: Perform a 1D FFT on the GPU using CuPy\n    a_h = cp.arange(10, dtype=cp.float32) # Host array (CPU)\n    a_d = cp.asarray(a_h) # Transfer to Device (GPU)\n    \n    print(f\"\\nOriginal array on GPU: {a_d}\")\n    \n    # Perform FFT on GPU using CuPy's wrapper for cuFFT\n    fft_result_d = cufft.fft(a_d)\n    \n    print(f\"FFT result on GPU: {fft_result_d}\")\n    \n    print(\"\\nNote: The `nvidia-cufft` package provides the underlying native\")\n    print(\"libraries that enable CuPy's GPU FFT functions to work. This\")\n    print(\"package itself does not expose direct Python imports or APIs.\")","lang":"python","description":"This quickstart demonstrates how a higher-level library like CuPy leverages `nvidia-cufft` for GPU-accelerated FFTs. The `nvidia-cufft` package itself provides the native shared libraries but no direct Python API. Installation of `cupy` is required to run this example.","tag":null,"tag_description":null,"last_tested":"2026-04-24","results":[{"runtime":"python:3.10-alpine","exit_code":1},{"runtime":"python:3.10-slim","exit_code":1},{"runtime":"python:3.11-alpine","exit_code":1},{"runtime":"python:3.11-slim","exit_code":1},{"runtime":"python:3.12-alpine","exit_code":1},{"runtime":"python:3.12-slim","exit_code":1},{"runtime":"python:3.13-alpine","exit_code":1},{"runtime":"python:3.13-slim","exit_code":1},{"runtime":"python:3.9-alpine","exit_code":1},{"runtime":"python:3.9-slim","exit_code":-1}]},"compatibility":null}