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
1e589e85
Unverified
Commit
1e589e85
authored
Feb 28, 2024
by
Muhammed Fatih BALIN
Committed by
GitHub
Feb 28, 2024
Browse files
[GraphBolt] Fix the exclude edge functions when int32 is used. (#7167)
parent
5db18933
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
4 deletions
+7
-4
python/dgl/graphbolt/sampled_subgraph.py
python/dgl/graphbolt/sampled_subgraph.py
+7
-4
No files found.
python/dgl/graphbolt/sampled_subgraph.py
View file @
1e589e85
...
...
@@ -292,8 +292,10 @@ def _exclude_homo_edges(
):
"""Return the indices of edges to be included."""
if
assume_num_node_within_int32
:
val
=
edges
[
0
]
<<
32
|
edges
[
1
]
val_to_exclude
=
edges_to_exclude
[
0
]
<<
32
|
edges_to_exclude
[
1
]
val
=
edges
[
0
].
long
()
<<
32
|
edges
[
1
].
long
()
val_to_exclude
=
(
edges_to_exclude
[
0
].
long
()
<<
32
|
edges_to_exclude
[
1
].
long
()
)
else
:
# TODO: Add support for value > int32.
raise
NotImplementedError
(
...
...
@@ -310,10 +312,11 @@ def _exclude_homo_edges_2(
):
"""Return the indices of edges to be included."""
if
assume_num_node_within_int32
:
val
=
edges
[
0
]
<<
32
|
edges
[
1
]
val
=
edges
[
0
]
.
long
()
<<
32
|
edges
[
1
]
.
long
()
edges_to_exclude_trans
=
edges_to_exclude
.
T
val_to_exclude
=
(
edges_to_exclude_trans
[
0
]
<<
32
|
edges_to_exclude_trans
[
1
]
edges_to_exclude_trans
[
0
].
long
()
<<
32
|
edges_to_exclude_trans
[
1
].
long
()
)
else
:
# TODO: Add support for value > int32.
...
...
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