Skip to content

Provide CUDA support for the binarize() operation on sparse matrices#601

Merged
CarloLucibello merged 6 commits intoJuliaGraphs:masterfrom
dferre97:df/binarize-cuda-sparse
Jun 21, 2025
Merged

Provide CUDA support for the binarize() operation on sparse matrices#601
CarloLucibello merged 6 commits intoJuliaGraphs:masterfrom
dferre97:df/binarize-cuda-sparse

Conversation

@dferre97
Copy link
Copy Markdown
Contributor

Made binarize() work on CUDA with sparse adjmat of type CUSPACE.CuSparseMatrixCSC.
Also, added a specialization of binarize() that takes an eltype as an additional arg and directly creates a binarized adjmat of that, avoiding potentially costly subsequent conversions.
However, note that for now this implementation won't be called during the fwd pass, as the CUDA propagate specialization falls back on the default gather/scatter approach, which doesn't use the adjecency matrix.
All tests on CPU and GPU correctly passed, except for 1 broken in "ChebConv GPU", but it is also broken on master.

Comment thread GNNGraphs/ext/GNNGraphsCUDAExt.jl Outdated
Comment thread GNNGraphs/ext/GNNGraphsCUDAExt.jl Outdated
Comment thread GNNGraphs/src/utils.jl Outdated
@CarloLucibello
Copy link
Copy Markdown
Member

The segmentation fault in GNNGGraphs CUDA CI should be investigated

Co-authored-by: Carlo Lucibello <carlo.lucibello@gmail.com>
Comment thread GNNGraphs/ext/GNNGraphsCUDAExt.jl Outdated
@CarloLucibello CarloLucibello merged commit c707e2e into JuliaGraphs:master Jun 21, 2025
5 of 7 checks passed
@dferre97 dferre97 deleted the df/binarize-cuda-sparse branch June 23, 2025 13:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants