From e8a5aefbbd417441124989515662ea03093d56f1 Mon Sep 17 00:00:00 2001 From: yongqiangma Date: Mon, 12 Oct 2020 16:19:07 +0800 Subject: [PATCH] update CUDAPlace doc. test=document_fix (#27711) --- paddle/fluid/pybind/pybind.cc | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/paddle/fluid/pybind/pybind.cc b/paddle/fluid/pybind/pybind.cc index 8c75db01dd2..0ee725c3022 100644 --- a/paddle/fluid/pybind/pybind.cc +++ b/paddle/fluid/pybind/pybind.cc @@ -1315,9 +1315,6 @@ All parameter, weight, gradient are variables in Paddle. py::class_(m, "Communicator").def(py::init<>()); #endif py::class_(m, "CUDAPlace", R"DOC( - **Note**: - For multi-card tasks, please use `FLAGS_selected_gpus` environment variable to set the visible GPU device. - The next version will fix the problem with `CUDA_VISIBLE_DEVICES` environment variable. CUDAPlace is a descriptor of a device. It represents a GPU device allocated or to be allocated with Tensor or LoDTensor. @@ -1336,8 +1333,10 @@ All parameter, weight, gradient are variables in Paddle. Examples: .. code-block:: python - import paddle.fluid as fluid - gpu_place = fluid.CUDAPlace(0) + import paddle + + place = paddle.CUDAPlace(0) + paddle.disable_static(place) )DOC") .def("__init__", -- GitLab