Skip to main content

Cross-vendor GPU FFT for Python: cuFFT (NVIDIA) and VkFFT (AMD/Intel/Apple/NVIDIA) under one API.

Project description

gpufft (Python)

Cross-vendor GPU FFT for Python. One API over two battle-tested libraries:

  • cuFFT on NVIDIA (backend="cuda")
  • VkFFT on any Vulkan device (backend="vulkan"): AMD, Intel, Apple Silicon (MoltenVK), NVIDIA
pip install gpufft
import numpy as np
import gpufft

x = (np.random.randn(4096) + 1j * np.random.randn(4096)).astype(np.complex64)

# NVIDIA via cuFFT
X = gpufft.fft.fft_1d_c2c_pow2(x, log_n=12, backend="cuda")

# Same call on any Vulkan GPU via VkFFT
X = gpufft.fft.fft_1d_c2c_pow2(x, log_n=12, backend="vulkan")

# Arbitrary (non-power-of-two) sizes
y = (np.random.randn(1000) + 1j * np.random.randn(1000)).astype(np.complex64)
Y = gpufft.fft.fft_1d_c2c(y, n=1000, backend="cuda")

The fft_1d_c2c_pow2 signature matches ferrum-gpu's, so code written against one package runs on the other. ferrum-gpu is the pure-Rust kernel path (transparent, hackable); gpufft is the vendor-library path (near-parity performance, cross-vendor today).

Persistent device handles

dev = gpufft.cuda.Device(0)        # or gpufft.vulkan.Device(0)
X = gpufft.fft.fft_1d_c2c_pow2(x, log_n=12, device=dev)

Runtime requirements

  • NVIDIA path: an NVIDIA driver providing libcufft.so (CUDA 13.x).
  • Vulkan path: a Vulkan 1.x loader (libvulkan.so.1) and an installed ICD.

Neither library is bundled; both are loaded from the system at runtime.

Status

This release ships 1D complex-to-complex transforms on both backends. 2D/3D, real transforms (R2C/C2R), and f64 are on the roadmap.

Apache-2.0.

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 Distribution

If you're not sure about the file name format, learn more about wheel file names.

gpufft-0.1.3-cp310-abi3-manylinux_2_28_x86_64.whl (4.8 MB view details)

Uploaded CPython 3.10+manylinux: glibc 2.28+ x86-64

File details

Details for the file gpufft-0.1.3-cp310-abi3-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for gpufft-0.1.3-cp310-abi3-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 027a06c6e4c735946cf084a2fd2e23c6231e7ac8a1aab9035caee4ab54574cf6
MD5 fc480ce76e863860dbaf321a79e9fbec
BLAKE2b-256 37227cd947c80af1790a2828393d381b9fed08d0ef645c8fb1ebec30a679aa12

See more details on using hashes here.

Provenance

The following attestation bundles were made for gpufft-0.1.3-cp310-abi3-manylinux_2_28_x86_64.whl:

Publisher: release.yml on alejandro-soto-franco/gpufft

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