diff --git a/python/paddle/fluid/framework.py b/python/paddle/fluid/framework.py index 3af32b930cf090b815ab931f3f4b5ec8e16a3a16..55e67327ec44d93bcf178a43fb393d6c8de509f3 100644 --- a/python/paddle/fluid/framework.py +++ b/python/paddle/fluid/framework.py @@ -6073,7 +6073,8 @@ def device_guard(device=None): A context manager that specifies the device on which the OP will be placed. Args: - device(str|None): Specify the device to use in the context. It should be 'cpu' or 'gpu', + device(str|None): Specify the device to use in the context. It should be ``cpu``, + ``gpu`` or ``gpu:x``, where ``x`` is the index of the GPUs. When it is set to 'cpu' or 'gpu', all OPs created in the context will be placed on CPUPlace or CUDAPlace. When 'gpu' is set and the program runs on single-card, the device index will be the same as the device on which the