#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.

Stars
1.1k
License
MIT
Last commit
Jun 2026
Last release
Oct 2023
Language
Python
Stars, last 29 weeks+9
7 May 2026: 1,098 stars14 May 2026: 1,098 stars21 May 2026: 1,098 stars28 May 2026: 1,098 stars4 Jun 2026: 1,099 stars11 Jun 2026: 1,100 stars18 Jun 2026: 1,100 stars25 Jun 2026: 1,102 stars2 Jul 2026: 1,102 stars9 Jul 2026: 1,103 stars16 Jul 2026: 1,103 stars23 Jul 2026: 1,104 stars30 Jul 2026: 1,104 stars6 Aug 2026: 1,104 stars13 Aug 2026: 1,104 stars20 Aug 2026: 1,104 stars27 Aug 2026: 1,105 stars3 Sept 2026: 1,105 stars10 Sept 2026: 1,105 stars17 Sept 2026: 1,105 stars24 Sept 2026: 1,105 stars1 Oct 2026: 1,106 stars8 Oct 2026: 1,106 stars15 Oct 2026: 1,106 stars22 Oct 2026: 1,106 stars29 Oct 2026: 1,106 stars5 Nov 2026: 1,106 stars12 Nov 2026: 1,107 stars19 Nov 2026: 1,107 stars26 Nov 2026: 1,107 stars

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
Also in ML frameworks and libraries
RankProjectScore
#413sense2vecPython library for part-of-speech-keyed word vectors, as a spaCy component Live demo ↗ (opens in a new tab)1.7k starsMIT16 out of 100
#414e3nnPyTorch library for building E(3)-equivariant neural networks Live demo ↗ (opens in a new tab)1.3k starscustom license16 out of 100
#416audiomentationsPython library for augmenting audio waveforms in ML training pipelines2.3k starsMIT15 out of 100
#417kernelbenchBenchmark for LLM-written GPU kernels against PyTorch reference programs1.3k starscustom license15 out of 100
#418nnaudioPyTorch library that computes spectrograms on the GPU with trainable Fourier kernels1.1k starsMIT15 out of 100