提交 11bfcf8a 编写于 作者: W Webbley

fix bug of CUDAPlace

上级 2a7bf171
...@@ -278,7 +278,7 @@ class StaticGraphWrapper(BaseGraphWrapper): ...@@ -278,7 +278,7 @@ class StaticGraphWrapper(BaseGraphWrapper):
graph: The static graph that should be put into memory graph: The static graph that should be put into memory
place: fluid.CPUPlace or fluid.GPUPlace(n) indicating the place: fluid.CPUPlace or fluid.CUDAPlace(n) indicating the
device to hold the graph data. device to hold the graph data.
Examples: Examples:
...@@ -456,7 +456,7 @@ class StaticGraphWrapper(BaseGraphWrapper): ...@@ -456,7 +456,7 @@ class StaticGraphWrapper(BaseGraphWrapper):
"""Placing the graph data into the devices. """Placing the graph data into the devices.
Args: Args:
place: fluid.CPUPlace or fluid.GPUPlace(n) indicating the place: fluid.CPUPlace or fluid.CUDAPlace(n) indicating the
device to hold the graph data. device to hold the graph data.
""" """
log.info( log.info(
...@@ -475,7 +475,7 @@ class GraphWrapper(BaseGraphWrapper): ...@@ -475,7 +475,7 @@ class GraphWrapper(BaseGraphWrapper):
Args: Args:
name: The graph data prefix name: The graph data prefix
place: fluid.CPUPlace or fluid.GPUPlace(n) indicating the place: fluid.CPUPlace or fluid.CUDAPlace(n) indicating the
device to hold the graph data. device to hold the graph data.
node_feat: A list of tuples that decribe the details of node node_feat: A list of tuples that decribe the details of node
......
...@@ -44,7 +44,7 @@ class HeterGraphWrapper(object): ...@@ -44,7 +44,7 @@ class HeterGraphWrapper(object):
Args: Args:
name: The heterogeneous graph data prefix name: The heterogeneous graph data prefix
place: fluid.CPUPlace or fluid.GPUPlace(n) indicating the place: fluid.CPUPlace or fluid.CUDAPlace(n) indicating the
device to hold the graph data. device to hold the graph data.
node_feat: A dict of list of tuples that decribe the details of node node_feat: A dict of list of tuples that decribe the details of node
......
...@@ -51,7 +51,7 @@ class GinTest(unittest.TestCase): ...@@ -51,7 +51,7 @@ class GinTest(unittest.TestCase):
g = graph.Graph(num_nodes=num_nodes, edges=edges, node_feat=node_feat) g = graph.Graph(num_nodes=num_nodes, edges=edges, node_feat=node_feat)
use_cuda = False use_cuda = False
place = F.GPUPlace(0) if use_cuda else F.CPUPlace() place = F.CUDAPlace(0) if use_cuda else F.CPUPlace()
prog = F.Program() prog = F.Program()
startup_prog = F.Program() startup_prog = F.Program()
......
...@@ -145,7 +145,7 @@ ...@@ -145,7 +145,7 @@
"source": [ "source": [
"import paddle.fluid as fluid\n", "import paddle.fluid as fluid\n",
"use_cuda = False \n", "use_cuda = False \n",
"place = fluid.GPUPlace(0) if use_cuda else fluid.CPUPlace()\n", "place = fluid.CUDAPlace(0) if use_cuda else fluid.CPUPlace()\n",
"\n", "\n",
"gw = pgl.graph_wrapper.GraphWrapper(name='graph',\n", "gw = pgl.graph_wrapper.GraphWrapper(name='graph',\n",
" place = place,\n", " place = place,\n",
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册