Skip to main content

cuspa: GPU spatial operations for spatial omics

CI

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

Install the prebuilt wheel for your CUDA major version:

[uv] pip install cuspa-cu12  # CUDA 12
[uv] pip install cuspa-cu13  # CUDA 13

Both distributions provide the cuspa Python package; install only one per environment. The optional adapters are extras, for example [uv] pip install "cuspa-cu12[geopandas]"; geoarrow and spatialdata work the same way.

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. Install the CuPy or PyTorch package for your CUDA environment separately. Aggregation and I/O adapters currently require CuPy.

To build from source instead, install the cuspa source distribution. This requires the matching CUDA toolkit and a C++17 compiler:

[uv] pip install cuspa

See the installation guide for wheel targets and source-build 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 for installation, usage, geometry input, the API reference, and the release notes. The site has documentation for main and for each release; pick one in the version switcher.

Contributing

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

Security

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

License

cuspa is licensed under Apache-2.0. See LICENSE.

Metadata

Release files for cuspa-cu12 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distributions (wheels)

Table of built distributions (wheels) for cuspa-cu12 0.1.0
File Interpreter ABI Platform Actions
cuspa_cu12-0.1.0-cp312-abi3-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl CPython 3.12 abi3 Linux glibc 2.28+ x86-64, Linux glibc 2.27+ x86-64 Details for cuspa_cu12-0.1.0-cp312-abi3-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
cuspa_cu12-0.1.0-cp312-abi3-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl CPython 3.12 abi3 Linux glibc 2.28+ ARM64, Linux glibc 2.26+ ARM64 Details for cuspa_cu12-0.1.0-cp312-abi3-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl

Total release size: 2.9 MB

Release files / cuspa_cu12-0.1.0-cp312-abi3-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl

Download URL cuspa_cu12-0.1.0-cp312-abi3-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Size 1.5 MB
Tags CPython 3.12 Linux glibc 2.27+ x86-64 Linux glibc 2.28+ x86-64 abi3
SHA-256 checksum
How to use checksums
57e3efe781e8868344840c4e2570dde3aa3e855db64c9e776ecb3bec4409eb1a
BLAKE2b-256 checksum
How to use checksums
ed84423ef1470d4eeb3b0702ab13a6102d5b7c31fcb6a38320f99ac24bf29472
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.8

Release files / cuspa_cu12-0.1.0-cp312-abi3-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl

Download URL cuspa_cu12-0.1.0-cp312-abi3-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl
Size 1.5 MB
Tags CPython 3.12 Linux glibc 2.26+ ARM64 Linux glibc 2.28+ ARM64 abi3
SHA-256 checksum
How to use checksums
b9f887e82548f960e4c0a97f457f57c3d62df71f601ac549a8096105f611d7ae
BLAKE2b-256 checksum
How to use checksums
cb7bb64d641961e36f3aab3a490ef89e68116b7a4ad00a0ecd97dc3ab68ca691
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.8

Security for cuspa-cu12 0.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page