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
0a42d863
Unverified
Commit
0a42d863
authored
Feb 03, 2024
by
Muhammed Fatih BALIN
Committed by
GitHub
Feb 02, 2024
Browse files
[GraphBolt][CUDA] GPUCachedFeature for multiGPU example. (#7074)
parent
d5b03bcb
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
0 deletions
+12
-0
examples/multigpu/graphbolt/node_classification.py
examples/multigpu/graphbolt/node_classification.py
+12
-0
No files found.
examples/multigpu/graphbolt/node_classification.py
View file @
0a42d863
...
...
@@ -284,6 +284,12 @@ def run(rank, world_size, args, devices, dataset):
hidden_size
=
256
out_size
=
num_classes
if
args
.
gpu_cache_size
>
0
:
dataset
.
feature
.
_features
[(
"node"
,
None
,
"feat"
)]
=
gb
.
GPUCachedFeature
(
dataset
.
feature
.
_features
[(
"node"
,
None
,
"feat"
)],
args
.
gpu_cache_size
,
)
# Create GraphSAGE model. It should be copied onto a GPU as a replica.
model
=
SAGE
(
in_size
,
hidden_size
,
out_size
).
to
(
device
)
model
=
DDP
(
model
)
...
...
@@ -381,6 +387,12 @@ def parse_args():
parser
.
add_argument
(
"--num-workers"
,
type
=
int
,
default
=
0
,
help
=
"The number of processes."
)
parser
.
add_argument
(
"--gpu-cache-size"
,
type
=
int
,
default
=
0
,
help
=
"The GPU cache size for input features."
,
)
parser
.
add_argument
(
"--mode"
,
default
=
"pinned-cuda"
,
...
...
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