未验证 提交 e8a5aefb 编写于 作者: myq406450149's avatar myq406450149 提交者: GitHub

update CUDAPlace doc. test=document_fix (#27711)

上级 16999ae4
......@@ -1315,9 +1315,6 @@ All parameter, weight, gradient are variables in Paddle.
py::class_<platform::Communicator>(m, "Communicator").def(py::init<>());
#endif
py::class_<platform::CUDAPlace>(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__",
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册