Skip to content

GPU wheel

bixverse_gpu

GPU twins of the bixverse single cell methods, on wgpu.

Each module mirrors its bixverse namesake (bixverse_gpu.pp for bixverse.pp, and so on) and its functions take the same experiment objects, write the same cache slots (bar Harmony and fastMNN, which write harmony_gpu and mnn_gpu) and obs columns and return the same result types as the CPU functions, so a pipeline swaps one import for the other:

>>> from bixverse import pp
>>> from bixverse_gpu import pp as pp_gpu
>>> pp.find_hvg(sc, hvg_no=2000)
>>> pp_gpu.calculate_pca(sc, 30)

The GPU-specific knobs live in bixverse_gpu.params; everything else takes the bixverse.params bundles. Probe the device with gpu_available(); the twins raise bixverse.BixverseError without one.

On Apple Silicon, PCA, the kNN, fast clustering, Harmony and SEACells also run on MLX with backend="mlx", in a source build with the mlx feature; probe it with mlx_available().

gpu_available

gpu_available() -> bool