JuliaGraphs / JuliaGraphs/GraphNeuralNetworks.jl

COO matrices support

Open
#607 1 comment 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

gnngraphs
Dominant language
Julia
Stars
308
Forks
74
Avg merge
3d 6h
Merged PRs (30d)
2

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

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by auditing the graph layers and operations that must work with underlying MatrixCOO storage, then compare CPU SparseMatricesCOO.jl with CUDA CUSPARSE.CuSparseMatrixCOO and their ordering requirements. Done means the supported layers and operations work with COO storage and the project has decided whether COO data must be sorted.

Written by the indexing model from the issue text.

Assessment

Tech stack
julia
Domain
data, machine-learning
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.