-
Notifications
You must be signed in to change notification settings - Fork 53
Open
Labels
Description
Currently, the default storage type for our graphs is the COO
format, which for us is a tuple of 3 vectors, (source, target, edge_weight)
.
This format is convenient for gather/scatter operations. On the other hand, as we move to using more and more sparse-dense multiplication for efficiency, it would be nice to construct without allocations a COO Sparse Matrix type out of the tuple to perform algebraic allocations. AFAIK, this is also what PyG does.
On CPU, this should be doable using https://github.com/JuliaSmoothOptimizers/SparseMatricesCOO.jl
On CUDA, we have CUSPARSE.CuSparseMatrixCOO. Unfortunately, this format requires edge ordering, which we currently don't guarantee.
- additional note: PyG/pytorch coo matrix type doesn't enforce edge ordering. Do they bypass CUSPARSE and provide their own multiplication kernels?
What to do:
- make sure that most layers and operations work we construct a graph with underlying MatrixCOO storage
- decide if we want to require our COO storage to be sorted