File tree Expand file tree Collapse file tree 2 files changed +14
-2
lines changed Expand file tree Collapse file tree 2 files changed +14
-2
lines changed Original file line number Diff line number Diff line change @@ -150,7 +150,7 @@ function test_gradients(
150
150
return true
151
151
end
152
152
153
- function generate_test_graphs (graph_type)
153
+ function generate_test_graphs (graph_type; do_coalesce = false )
154
154
adj1 = [0 1 0 1
155
155
1 0 1 0
156
156
0 1 0 1
@@ -168,12 +168,18 @@ function generate_test_graphs(graph_type)
168
168
g_single_vertex = GNNGraph (adj_single_vertex,
169
169
ndata = rand (Float32, D_IN, 4 );
170
170
graph_type)
171
+
172
+ if graph_type == :coo && do_coalesce
173
+ g1 = coalesce (g1)
174
+ g_single_vertex = coalesce (g_single_vertex)
175
+ end
171
176
172
177
return (g1, g_single_vertex)
173
178
end
174
179
175
180
GRAPH_TYPES = [:coo , :dense , :sparse ]
176
181
TEST_GRAPHS = [generate_test_graphs (:coo )... ,
182
+ generate_test_graphs (:coo , do_coalesce= true )... ,
177
183
generate_test_graphs (:dense )... ,
178
184
generate_test_graphs (:sparse )... ]
179
185
Original file line number Diff line number Diff line change @@ -157,7 +157,7 @@ function test_gradients(
157
157
end
158
158
159
159
160
- function generate_test_graphs (graph_type)
160
+ function generate_test_graphs (graph_type; do_coalesce = false )
161
161
adj1 = [0 1 0 1
162
162
1 0 1 0
163
163
0 1 0 1
@@ -175,12 +175,18 @@ function generate_test_graphs(graph_type)
175
175
g_single_vertex = GNNGraph (adj_single_vertex,
176
176
ndata = rand (Float32, D_IN, 4 );
177
177
graph_type)
178
+
179
+ if graph_type == :coo && do_coalesce
180
+ g1 = coalesce (g1)
181
+ g_single_vertex = coalesce (g_single_vertex)
182
+ end
178
183
179
184
return (g1, g_single_vertex)
180
185
end
181
186
182
187
GRAPH_TYPES = [:coo , :dense , :sparse ]
183
188
TEST_GRAPHS = [generate_test_graphs (:coo )... ,
189
+ generate_test_graphs (:coo , do_coalesce= true )... ,
184
190
generate_test_graphs (:dense )... ,
185
191
generate_test_graphs (:sparse )... ]
186
192
You can’t perform that action at this time.
0 commit comments