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
bdaa1309
Unverified
Commit
bdaa1309
authored
Dec 01, 2023
by
Rhett Ying
Committed by
GitHub
Dec 01, 2023
Browse files
[doc] fix device issue (#6660)
parent
dcc227d7
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
7 deletions
+5
-7
notebooks/graphbolt/walkthrough.ipynb
notebooks/graphbolt/walkthrough.ipynb
+5
-7
No files found.
notebooks/graphbolt/walkthrough.ipynb
View file @
bdaa1309
...
...
@@ -27,10 +27,9 @@
"os.environ['TORCH'] = torch.__version__\n",
"os.environ['DGLBACKEND'] = \"pytorch\"\n",
"\n",
"# Uncomment below to install required packages. If the CUDA version is not 11.8,\n",
"# check the https://www.dgl.ai/pages/start.html to find the supported CUDA\n",
"# version and corresponding command to install DGL.\n",
"# !pip install --pre dgl -f https://data.dgl.ai/wheels-test/cu118/repo.html > /dev/null\n",
"# Install the CPU version.\n",
"device = torch.device(\"cpu\")\n",
"!pip install --pre dgl -f https://data.dgl.ai/wheels-test/repo.html\n",
"\n",
"try:\n",
" import dgl.graphbolt as gb\n",
...
...
@@ -259,7 +258,7 @@
},
"outputs": [],
"source": [
"datapipe = datapipe.copy_to(device=
\"cuda\"
)\n",
"datapipe = datapipe.copy_to(device=
device
)\n",
"print(next(iter(datapipe)))"
]
},
...
...
@@ -318,7 +317,6 @@
"metadata": {
"accelerator": "GPU",
"colab": {
"authorship_tag": "ABX9TyOCdFtYQweXnIR1/5oWDSGq",
"collapsed_sections": [
"BjkAK37xopp1"
],
...
...
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