Skip to content

Commit 6cd2f0a

Browse files
use GBMatrix
1 parent 5d53d05 commit 6cd2f0a

File tree

3 files changed

+4
-3
lines changed

3 files changed

+4
-3
lines changed

Project.toml

+1
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ Reexport = "189a3867-3050-52da-a836-e630ba90ab69"
2222
SparseArrays = "2f01184e-e22b-5df5-ae63-d93ebab69eaf"
2323
Statistics = "10745b16-79ce-11e8-11f9-7d13ad32a3b2"
2424
StatsBase = "2913bbd2-ae8a-5f71-8c99-4fb6c76f3a91"
25+
SuiteSparseGraphBLAS = "c2e53296-7b14-11e9-1210-bddfa8111e1d"
2526
TestEnv = "1e6cf692-eddd-4d53-88a5-2d735e33781b"
2627

2728
[compat]

src/GNNGraphs/convert.jl

+2-2
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ function to_sparse(A::ADJMAT_T, T::DataType=eltype(A); dir=:out, num_nodes=nothi
124124
A = T.(A)
125125
end
126126
if !(A isa AbstractSparseMatrix)
127-
A = sparse(A)
127+
A = GBMatrix(sparse(A))
128128
end
129129
return A, num_nodes, num_edges
130130
end
@@ -140,7 +140,7 @@ function to_sparse(coo::COO_T, T::DataType=Int; dir=:out, num_nodes=nothing)
140140
num_nodes = isnothing(num_nodes) ? max(maximum(s), maximum(t)) : num_nodes
141141
A = sparse(s, t, eweight, num_nodes, num_nodes)
142142
num_edges = length(s)
143-
return A, num_nodes, num_edges
143+
return GBMatrix(A), num_nodes, num_edges
144144
end
145145

146146

test/runtests.jl

+1-1
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ tests = [
3737

3838
!CUDA.functional() && @warn("CUDA unavailable, not testing GPU support")
3939

40-
@testset "GraphNeuralNetworks: graph format $graph_type" for graph_type in (:coo, :dense, :sparse)
40+
@testset "GraphNeuralNetworks: graph format $graph_type" for graph_type in (:sparse, :coo, :dense,)
4141
global GRAPH_T = graph_type
4242
global TEST_GPU = CUDA.functional() && (GRAPH_T != :sparse)
4343

0 commit comments

Comments
 (0)