Content-Length: 271506 | pFad | http://github.com/karShetty/Torch-Sparse-Multiply

4D GitHub - karShetty/Torch-Sparse-Multiply: PyTorch Memory Efficient Sparse Sparse Matrix Multiplication
Skip to content

karShetty/Torch-Sparse-Multiply

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

spspmm: PyTorch Memory Efficient Sparse Sparse Matrix Multiplication

An example Pytorch module for Sparse Sparse Matrix Multiplication based on memory efficient algorithm ALG2 and ALG3. Here is the cusparseSpGEMM sample.

Building from source

NOTE: This works with only CUDA >=12.0 (tested on PyTorch 12.1).

python setup.py install

Running (example)

That's it! You're now ready to go. Here's a quick guide to using the package.

>>> import torch
>>> from spspmm import spspmm

Create two random coo sparse tensors. Here, the first dim is the batch

>>> a = torch.randn((4,3,5)).cuda().to_sparse()
>>> b = torch.randn((4,5,3)).cuda().to_sparse()
>>> c = spspmm(a, b)

Batching works based on concatenation based on this .

About

PyTorch Memory Efficient Sparse Sparse Matrix Multiplication

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: http://github.com/karShetty/Torch-Sparse-Multiply

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy