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-cu13 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-cu13 0.1.0rc1
File Interpreter ABI Platform Actions
cuspa_cu13-0.1.0rc1-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_cu13-0.1.0rc1-cp312-abi3-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
cuspa_cu13-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_cu13-0.1.0rc1-cp312-abi3-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl

Total release size: 1.9 MB

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

Download URL cuspa_cu13-0.1.0rc1-cp312-abi3-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Size 974.4 kB
Tags CPython 3.12 Linux glibc 2.27+ x86-64 Linux glibc 2.28+ x86-64 abi3
SHA-256 checksum
How to use checksums
2995fb1031866d148c33eda3f73b08f6e542cf0d631f43bb4dfdf4cec727f965
BLAKE2b-256 checksum
How to use checksums
009ed371985db94258b6f796203dcabd2d8dd1c051605f22303d7934408f4258
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.8

Release files / cuspa_cu13-0.1.0rc1-cp312-abi3-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl

Download URL cuspa_cu13-0.1.0rc1-cp312-abi3-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl
Size 960.9 kB
Tags CPython 3.12 Linux glibc 2.26+ ARM64 Linux glibc 2.28+ ARM64 abi3
SHA-256 checksum
How to use checksums
57e9959acf642c299051f7d35fa5c16d60c810002dac60937769f96160273a0b
BLAKE2b-256 checksum
How to use checksums
431cf9a0805a4ece571fc402898c4b310a34863f9f36db5e593f22370b531237
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.8

Security for cuspa-cu13 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