diff --git a/docs/source/quick_start/md/quick_start.md b/docs/source/quick_start/md/quick_start.md index de50b83037db464787b45e86b0344f536a07742e..7df4f48a997e35c001ae462b1f9d3052434eb443 100644 --- a/docs/source/quick_start/md/quick_start.md +++ b/docs/source/quick_start/md/quick_start.md @@ -49,7 +49,7 @@ Currently our PGL is developed based on static computational mode of paddle (we import paddle.fluid as fluid use_cuda = False -place = fluid.GPUPlace(0) if use_cuda else fluid.CPUPlace() +place = fluid.CUDAPlace(0) if use_cuda else fluid.CPUPlace() # use GraphWrapper as a container for graph data to construct a graph neural network gw = pgl.graph_wrapper.GraphWrapper(name='graph', diff --git a/pgl/graph_wrapper.py b/pgl/graph_wrapper.py index 9545a8210567e55dbadf37251ddf475a5ac9f5f9..3f30da477a5e97287315efc4e693eaa022399d84 100644 --- a/pgl/graph_wrapper.py +++ b/pgl/graph_wrapper.py @@ -278,7 +278,7 @@ class StaticGraphWrapper(BaseGraphWrapper): 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. Examples: @@ -456,7 +456,7 @@ class StaticGraphWrapper(BaseGraphWrapper): """Placing the graph data into the devices. 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. """ log.info( @@ -475,7 +475,7 @@ class GraphWrapper(BaseGraphWrapper): Args: 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. node_feat: A list of tuples that decribe the details of node diff --git a/pgl/heter_graph_wrapper.py b/pgl/heter_graph_wrapper.py index 3f16efb892dfdda94e96e3bfb38068cd4f9ca82f..a56bc4e3151b1ab0a136e939e4b736cb8bc32742 100644 --- a/pgl/heter_graph_wrapper.py +++ b/pgl/heter_graph_wrapper.py @@ -44,7 +44,7 @@ class HeterGraphWrapper(object): Args: 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. node_feat: A dict of list of tuples that decribe the details of node diff --git a/pgl/tests/test_gin.py b/pgl/tests/test_gin.py index 7abdbad2f07114d14b70d8b08604e567f75367ae..a228de3d1c2dbcefde701457feea7d91d09a0d49 100644 --- a/pgl/tests/test_gin.py +++ b/pgl/tests/test_gin.py @@ -51,7 +51,7 @@ class GinTest(unittest.TestCase): g = graph.Graph(num_nodes=num_nodes, edges=edges, node_feat=node_feat) 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() startup_prog = F.Program() diff --git a/tutorials/1-Introduction.ipynb b/tutorials/1-Introduction.ipynb index 991bf88b3e4ee74ee0f727b510b407269a16e9dc..9d849a015e855b072f634d15c8084e07520831af 100644 --- a/tutorials/1-Introduction.ipynb +++ b/tutorials/1-Introduction.ipynb @@ -145,7 +145,7 @@ "source": [ "import paddle.fluid as fluid\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", "gw = pgl.graph_wrapper.GraphWrapper(name='graph',\n", " place = place,\n",