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
391f513e
Unverified
Commit
391f513e
authored
Feb 21, 2024
by
Muhammed Fatih BALIN
Committed by
GitHub
Feb 22, 2024
Browse files
[GraphBolt][CUDA] Make sure in-place pinning is used in examples. (#7138)
parent
00f33224
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
4 deletions
+12
-4
examples/sampling/graphbolt/link_prediction.py
examples/sampling/graphbolt/link_prediction.py
+6
-2
examples/sampling/graphbolt/node_classification.py
examples/sampling/graphbolt/node_classification.py
+6
-2
No files found.
examples/sampling/graphbolt/link_prediction.py
View file @
391f513e
...
...
@@ -392,8 +392,12 @@ def main(args):
dataset
=
gb
.
BuiltinDataset
(
"ogbl-citation2"
).
load
()
# Move the dataset to the selected storage.
graph
=
dataset
.
graph
.
to
(
args
.
storage_device
)
features
=
dataset
.
feature
.
to
(
args
.
storage_device
)
if
args
.
storage_device
==
"pinned"
:
graph
=
dataset
.
graph
.
pin_memory_
()
features
=
dataset
.
feature
.
pin_memory_
()
else
:
graph
=
dataset
.
graph
.
to
(
args
.
storage_device
)
features
=
dataset
.
feature
.
to
(
args
.
storage_device
)
train_set
=
dataset
.
tasks
[
0
].
train_set
args
.
fanout
=
list
(
map
(
int
,
args
.
fanout
.
split
(
","
)))
...
...
examples/sampling/graphbolt/node_classification.py
View file @
391f513e
...
...
@@ -404,8 +404,12 @@ def main(args):
dataset
=
gb
.
BuiltinDataset
(
"ogbn-products"
).
load
()
# Move the dataset to the selected storage.
graph
=
dataset
.
graph
.
to
(
args
.
storage_device
)
features
=
dataset
.
feature
.
to
(
args
.
storage_device
)
if
args
.
storage_device
==
"pinned"
:
graph
=
dataset
.
graph
.
pin_memory_
()
features
=
dataset
.
feature
.
pin_memory_
()
else
:
graph
=
dataset
.
graph
.
to
(
args
.
storage_device
)
features
=
dataset
.
feature
.
to
(
args
.
storage_device
)
train_set
=
dataset
.
tasks
[
0
].
train_set
valid_set
=
dataset
.
tasks
[
0
].
validation_set
...
...
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