Unverified Commit bdaa1309 authored by Rhett Ying's avatar Rhett Ying Committed by GitHub
Browse files

[doc] fix device issue (#6660)

parent dcc227d7
......@@ -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"
],
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment