spcl / sten

Sparsity support for PyTorch
31 stars 3 forks source link

STen: An Interface for Efficient Sparsity in PyTorch

STen aims to solve the following questions that remained unanswered in the current implementation (torch.sparse) of sparsity in PyTorch 1.11.

Examples

Quick start

git clone https://github.com/spcl/sten.git
cd sten
python -m venv venv
source venv/bin/activate
pip install .
python tests/test_api.py

Installation

pip install sten

Code organization

The core implementation is located in sten.py. Jupyter notebook examples are located in examples directory. Even more examples can be found in form of tests in tests directory. Tests can be run by calling pytest in the project root.