From 809516f61cf7437fe56c0a9ab699e5467c44b9f6 Mon Sep 17 00:00:00 2001 From: Leo Chen Date: Mon, 21 Nov 2022 19:14:59 +0800 Subject: [PATCH] fix doc of NPUPlace (#48148) * fix doc of NPUPlace * fix doc of NPUPlace, test=document_fix --- paddle/fluid/pybind/place.cc | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/paddle/fluid/pybind/place.cc b/paddle/fluid/pybind/place.cc index 72e672792d..b39427f8b3 100644 --- a/paddle/fluid/pybind/place.cc +++ b/paddle/fluid/pybind/place.cc @@ -553,8 +553,11 @@ void BindPlace(pybind11::module &m) { // NOLINT Examples: .. code-block:: python + + # required: npu + import paddle - npu_place = paddle.NPUPlace(0) + place = paddle.NPUPlace(0) )DOC"); g_npuplace_pytype = reinterpret_cast(npuplace.ptr()); -- GitLab