Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

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, and the API reference.

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.0rc1

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.0rc1
File Interpreter ABI Platform Actions
cuspa_cu12-0.1.0rc1-cp312-abi3-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl CPython 3.12 abi3 Linux glibc 2.27+ x86-64, Linux glibc 2.28+ x86-64 Details for cuspa_cu12-0.1.0rc1-cp312-abi3-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
cuspa_cu12-0.1.0rc1-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.0rc1-cp312-abi3-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl

Total release size: 2.8 MB

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

Download URL cuspa_cu12-0.1.0rc1-cp312-abi3-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Size 1.4 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
312c25127fb490a02de7551de9c082c386d0d56b45e27d8d0fd3e4f0499fcf21
BLAKE2b-256 checksum
How to use checksums
d96085555dd11fdf6cdb02e0755fb4ea476d67a303681baa878ba0e535833998
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.0rc1-cp312-abi3-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl

Download URL cuspa_cu12-0.1.0rc1-cp312-abi3-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl
Size 1.4 MB
Tags CPython 3.12 Linux glibc 2.26+ ARM64 Linux glibc 2.28+ ARM64 abi3
SHA-256 checksum
How to use checksums
60eb1ac01310ad0a811b7d22506951501b27cd20bc55482b5784aef8860779f1
BLAKE2b-256 checksum
How to use checksums
77e20fd1b20cc9b73cf4ceeca3409abd799cd034629afaf865b49bc4429537a5
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.0rc1

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