Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
OpenDAS
dgl
Commits
111a4aa7
Unverified
Commit
111a4aa7
authored
Feb 20, 2019
by
Da Zheng
Committed by
GitHub
Feb 20, 2019
Browse files
[Bugfix] Fix the SSE tutorial in CI. (#401)
* fix. * add check. * fix assert.
parent
6e7f3f3d
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
4 deletions
+5
-4
src/graph/sampler.cc
src/graph/sampler.cc
+5
-4
No files found.
src/graph/sampler.cc
View file @
111a4aa7
...
@@ -292,7 +292,7 @@ NodeFlow ConstructNodeFlow(std::vector<dgl_id_t> neighbor_list,
...
@@ -292,7 +292,7 @@ NodeFlow ConstructNodeFlow(std::vector<dgl_id_t> neighbor_list,
node_map_data
[
out_node_idx
++
]
=
sub_vers
->
at
(
i
).
first
;
node_map_data
[
out_node_idx
++
]
=
sub_vers
->
at
(
i
).
first
;
layer_ver_maps
[
layer_id
].
insert
(
std
::
pair
<
dgl_id_t
,
dgl_id_t
>
(
sub_vers
->
at
(
i
).
first
,
layer_ver_maps
[
layer_id
].
insert
(
std
::
pair
<
dgl_id_t
,
dgl_id_t
>
(
sub_vers
->
at
(
i
).
first
,
ver_id
++
));
ver_id
++
));
assert
(
sub_vers
->
at
(
i
).
second
==
layer_id
);
CHECK_EQ
(
sub_vers
->
at
(
i
).
second
,
layer_id
);
}
}
}
}
CHECK
(
out_node_idx
==
num_vertices
);
CHECK
(
out_node_idx
==
num_vertices
);
...
@@ -318,16 +318,17 @@ NodeFlow ConstructNodeFlow(std::vector<dgl_id_t> neighbor_list,
...
@@ -318,16 +318,17 @@ NodeFlow ConstructNodeFlow(std::vector<dgl_id_t> neighbor_list,
for
(
size_t
i
=
layer_offsets
[
layer_id
];
i
<
layer_offsets
[
layer_id
+
1
];
i
++
)
{
for
(
size_t
i
=
layer_offsets
[
layer_id
];
i
<
layer_offsets
[
layer_id
+
1
];
i
++
)
{
dgl_id_t
dst_id
=
sub_vers
->
at
(
i
).
first
;
dgl_id_t
dst_id
=
sub_vers
->
at
(
i
).
first
;
assert
(
dst_id
==
neigh_pos
->
at
(
i
).
id
);
CHECK_EQ
(
dst_id
,
neigh_pos
->
at
(
i
).
id
);
size_t
pos
=
neigh_pos
->
at
(
i
).
pos
;
size_t
pos
=
neigh_pos
->
at
(
i
).
pos
;
CHECK_L
T
(
pos
,
neighbor_list
.
size
());
CHECK_L
E
(
pos
,
neighbor_list
.
size
());
size_t
num_edges
=
neigh_pos
->
at
(
i
).
num_edges
;
size_t
num_edges
=
neigh_pos
->
at
(
i
).
num_edges
;
if
(
neighbor_list
.
empty
())
CHECK
(
num_edges
==
0
);
// We need to map the Ids of the neighbors to the subgraph.
// We need to map the Ids of the neighbors to the subgraph.
auto
neigh_it
=
neighbor_list
.
begin
()
+
pos
;
auto
neigh_it
=
neighbor_list
.
begin
()
+
pos
;
for
(
size_t
i
=
0
;
i
<
num_edges
;
i
++
)
{
for
(
size_t
i
=
0
;
i
<
num_edges
;
i
++
)
{
dgl_id_t
neigh
=
*
(
neigh_it
+
i
);
dgl_id_t
neigh
=
*
(
neigh_it
+
i
);
assert
(
layer_ver_maps
[
layer_id
+
1
].
find
(
neigh
)
!=
layer_ver_maps
[
layer_id
+
1
].
end
());
CHECK
(
layer_ver_maps
[
layer_id
+
1
].
find
(
neigh
)
!=
layer_ver_maps
[
layer_id
+
1
].
end
());
col_list_out
[
collected_nedges
+
i
]
=
layer_ver_maps
[
layer_id
+
1
][
neigh
];
col_list_out
[
collected_nedges
+
i
]
=
layer_ver_maps
[
layer_id
+
1
][
neigh
];
}
}
// We can simply copy the edge Ids.
// We can simply copy the edge Ids.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment