Skip to content

trnsparse 0.1.3

Choose a tag to compare

@scttfrdmn scttfrdmn released this 13 Apr 03:00
· 45 commits to main since this release

Changed

  • spmv, spmm, spmv_symmetric, and CSRMatrix.to_dense now lower to torch.sparse_csr_tensor operations instead of per-row Python loops.
  • On CPU (256×256, density 0.01) the change is 26× faster for SpMV (958 μs → 37 μs) and 52–88× faster for SpMM (1.2 ms → 13–24 μs depending on RHS width), putting trnsparse's PyTorch fallback within 2× of torch.sparse.

Pure performance change — no API or numeric-output differences. All 25 existing tests pass unchanged. NKI backend remains scaffolded; routing lands in v0.2.0.

Added

  • benchmarks/ directory (conftest.py, bench_spmv.py, bench_spmm.py, bench_screening.py) running trnsparse vs scipy.sparse vs torch.sparse on the same numeric inputs. Closes #11; partial #4.