"docs/vscode:/vscode.git/clone" did not exist on "7c3a75a1ce7bdae1632dbcfd0bf2fda349a6fa36"
dgl.sparse_v0.rst 1.2 KB
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
.. _apibackend:

dgl.mock_sparse
=================================

`dgl_sparse` is a library for sparse operators that are commonly used in GNN models.

.. warning::
    This is an experimental package. The sparse operators provided in this library do not guarantee the same performance as their message-passing api counterparts.

Sparse matrix class
-------------------------
.. currentmodule:: dgl.mock_sparse

.. autoclass:: SparseMatrix
16
	:members: shape, nnz, dtype, device, row, col, val, __call__, indices, coo, csr, csc, dense, t, T, transpose,
17
            reduce, sum, smax, smin, smean, __neg__, inv, softmax, __matmul__
18
19
20
21
22
23
24
25
26
27
28
29
30

.. autosummary::
    :toctree: ../../generated/

    create_from_coo
    create_from_csr
    create_from_csc

Diagonal matrix class
-------------------------
.. currentmodule:: dgl.mock_sparse

.. autoclass:: DiagMatrix
31
	:members: val, shape, __call__, nnz, dtype, device, as_sparse, t, T, transpose,
32
            reduce, sum, smax, smin, smean, __neg__, inv, softmax, __matmul__
33
34
35
36
37
38

.. autosummary::
    :toctree: ../../generated/

    diag
    identity
39
40
41
42
43
44
45
46
47
48
49
50

Operators
---------
.. currentmodule:: dgl.mock_sparse

.. autosummary::
    :toctree: ../../generated/

    spmm
    spspmm
    bspmm
    bspspmm