PyTorch Extension Library of Optimized Autograd Sparse Matrix Operations
PyTorch Sparse
This package consists of a small extension library of optimized sparse matrix operations with autograd support.
This package currently consists of the following methods:
All included operations work on varying data types and are implemented both for CPU and GPU.
To avoid the hazzle of creating torch.sparse_coo_tensor, this package defines operations on sparse tensors by simply passing index and value tensors as arguments (with same shapes as defined in PyTorch).
Note that only value comes with autograd support, as index is discrete and therefore not differentiable.
Installation
Anaconda
Update: You can now install pytorch-sparse via Anaconda for all major OS/PyTorch/CUDA combinations 🤗
Given that you have pytorch >= 1.8.0 installed, simply run
conda install pytorch-sparse -c rusty1s
Binaries
We alternatively provide pip