RepoNVIDIANVIDIApublished Aug 31, 2026seen 3w

NVIDIA/cuspa

Cuda

Open original ↗

Captured source

source ↗
published Aug 31, 2026seen 3wcaptured 3whttp 200method plain

NVIDIA/cuspa

Description: Lightweight GPU-accelerated spatial operations for spatial omics, with CUDA kernels and Python APIs for point-in-polygon queries, overlap detection, and cell-level aggregation.

Language: Cuda

License: Apache-2.0

Stars: 0

Forks: 0

Open issues: 0

Created: 2026-08-31T16:13:16Z

Pushed: 2026-09-14T17:44:37Z

Default branch: main

Fork: no

Archived: no

README:

cuspa: GPU spatial operations for spatial omics

![CI](https://github.com/NVIDIA/cuspa/actions/workflows/ci.yml)

cuspa assigns transcript coordinates to cell polygons and builds sparse cells-by-genes count matrices on the GPU. Geometry is stored in flat GeoArrow-style buffers. GeoPandas and SpatialData inputs are converted before GPU computation.

Installation

cuspa requires Python 3.12 or newer, a compatible NVIDIA GPU and driver, a CUDA 12 or CUDA 13 runtime, and CuPy or CUDA-enabled PyTorch. Aggregation and I/O adapters currently require CuPy. Source builds also require the matching CUDA toolkit and a C++17 compiler.

Install from source with:

python -m pip install .

When published to PyPI, wheels will use separate distribution names for CUDA 12 and CUDA 13:

python -m pip install cuspa-cu12 # CUDA 12
python -m pip install cuspa-cu13 # CUDA 13

Both distributions provide the cuspa Python package; they must not be installed together in one environment.

Install the CuPy or PyTorch package for your CUDA environment separately. From a source checkout, install optional adapters with:

python -m pip install ".[geoarrow]"
python -m pip install ".[geopandas]"
python -m pip install ".[spatialdata]"

See the [installation guide](docs/install.md) for source-build and wheel details.

Usage

import cuspa as cs

polys = cs.io.from_spatialdata(sdata, "cell_boundaries")
tx = cs.io.transcripts_from_spatialdata(sdata, "transcripts")

csr = cs.tl.aggregate_to_cells(
[(tx.xy, tx.gene_ids)],
polys,
num_genes=len(tx.gene_names),
)

Documentation

See the [documentation](docs/index.md) for installation, usage, geometry input, and the API reference.

Contributing

External contributions are open through pull requests. Report bugs and propose changes through GitHub Issues. See [CONTRIBUTING.md](CONTRIBUTING.md) for the contribution process. All project participants must follow the [Code of Conduct](CODE_OF_CONDUCT.md).

Security

Do not report vulnerabilities through public GitHub issues. See [SECURITY.md](SECURITY.md) for NVIDIA's private reporting channels.

License

cuspa is licensed under Apache-2.0. See [LICENSE](LICENSE).