"vscode:/vscode.git/clone" did not exist on "9ef43f38d43217f690e222a4ce0239c6a24af981"
README.md 1.92 KB
Newer Older
rusty1s's avatar
rusty1s committed
1
2
3
4
5
6
[pypi-image]: https://badge.fury.io/py/torch-sparse.svg
[pypi-url]: https://pypi.python.org/pypi/torch-sparse
[build-image]: https://travis-ci.org/rusty1s/pytorch_sparse.svg?branch=master
[build-url]: https://travis-ci.org/rusty1s/pytorch_sparse
[coverage-image]: https://codecov.io/gh/rusty1s/pytorch_sparse/branch/master/graph/badge.svg
[coverage-url]: https://codecov.io/github/rusty1s/pytorch_sparse?branch=master
rusty1s's avatar
rusty1s committed
7

rusty1s's avatar
rusty1s committed
8
# PyTorch Sparse
rusty1s's avatar
rusty1s committed
9
10
11
12
13
14

[![PyPI Version][pypi-image]][pypi-url]
[![Build Status][build-image]][build-url]
[![Code Coverage][coverage-image]][coverage-url]

--------------------------------------------------------------------------------
rusty1s's avatar
rusty1s committed
15
16

This package consists of a small extension library of optimized sparse matrix operations for the use in [PyTorch](http://pytorch.org/), which are missing and or lack autograd support in the main package.
rusty1s's avatar
typos  
rusty1s committed
17
This package currently consists of the following methods:
rusty1s's avatar
rusty1s committed
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42

* **[Autograd Sparse Tensor Creation](#Autograd Sparse Tensor Creation)**
* **[Autograd Sparse Tensor Value Extraction](#Autograd Sparse Tensor Value Extraction)**
* **[Sparse Sparse Matrix Multiplication](#Sparse Sparse Matrix Multiplication)**

All included operations work on varying data types and are implemented both for CPU and GPU.

## Installation

Ensure that PyTorch 0.4.0 is installed and verify that `cuda/bin` and `cuda/install` are in your `$PATH` and `$CPATH` respectively, *e.g.*:

```
$ echo $PATH
/usr/local/cuda/bin:...

$ echo $CPATH
/usr/local/cuda/install:...
```

Then run:

```
pip install cffi torch-sparse
```

rusty1s's avatar
typos  
rusty1s committed
43
If you are running into any installation problems, please follow these [instructions](https://rusty1s.github.io/pytorch_geometric/build/html/notes/installation.html) first before creating an [issue](https://github.com/rusty1s/pytorch_sparse/issues).
rusty1s's avatar
links  
rusty1s committed
44

rusty1s's avatar
rusty1s committed
45
46
47
48
49
50
51
52
53
54
55
## Autograd Sparse Tensor Creation

## Autograd Sparse Tensor Value Extraction

## Sparse Sparse Matrix Multiplication

## Running tests

```
python setup.py test
```