#415415th of 433 in ML frameworks and libraries
pytorch_sparse
PyTorch extension for sparse matrix ops with autograd on CPU and GPU
Run it:Vast.ai ↗ (opens in a new tab)Clore.ai ↗ (opens in a new tab)Affiliate links, no effect on a rank.
Watch puts pytorch_sparse on your watch list: its new releases and known problems since your last visit. Kept in this browser, no account.pytorch_sparse is on your watch list. Its new releases and problems show there.
- Stars
- 1.1k
- License
- MIT
- Last commit
- Jun 2026
- Last release
- Oct 2023
- Language
- Python
1,098 on 7 May 20261,107 on 26 Nov 2026
From GitHub's daily star counts.
Checked on GitHub.
Overview
torch-sparse is a small PyTorch extension that implements coalesce, transpose, sparse-dense matmul (spmm) and sparse-sparse matmul (spspmm). Operations take separate index and value tensors instead of torch.sparse_coo_tensor, and gradients flow through value only. Prebuilt pip wheels cover many PyTorch/CUDA combinations, and a C++ API and optional METIS support are available when building from source.
Who it is for: PyTorch developers needing sparse matrix ops, e.g. for graph neural networks
Strengths
- Prebuilt wheels for PyTorch 1.4 through 2.12 across CPU and several CUDA versions
- Operations work on plain index and value tensors, no sparse_coo_tensor needed
- Autograd support for value tensors, with CPU and GPU implementations
- Optional C++ API and METIS build for graph partitioning
Weaknesses
- Only four operations: coalesce, transpose, spmm and spspmm
- No gradient for index tensors, since they are discrete
- Last tagged release is 2023-10-06, so installs rely on external wheel index
- spspmm requires coalesced inputs unless the coalesced flag is set
What it needs
- GPU optional
- Needs PyTorch, torch-scatter, CUDA toolkit (GPU source builds), METIS (optional)
What changed
From the release notes. No flag means the note does not say so, not that the upgrade is safe. Releases and problems by RSS
Also in ML frameworks and libraries
See all 433| Rank | Project | Score |
|---|---|---|
| #413 | sense2vecPython library for part-of-speech-keyed word vectors, as a spaCy component | 16 out of 100 |
| #414 | e3nnPyTorch library for building E(3)-equivariant neural networks | 16 out of 100 |
| #416 | audiomentationsPython library for augmenting audio waveforms in ML training pipelines | 15 out of 100 |
| #417 | kernelbenchBenchmark for LLM-written GPU kernels against PyTorch reference programs | 15 out of 100 |
| #418 | nnaudioPyTorch library that computes spectrograms on the GPU with trainable Fourier kernels | 15 out of 100 |