From 136ef09de778c589636dca0dd85253a61a442ac6 Mon Sep 17 00:00:00 2001 From: Zhang Ting Date: Sun, 25 Apr 2021 10:30:17 +0800 Subject: [PATCH] add detail for gpu_id, document_fix (#32444) --- python/paddle/fluid/framework.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/python/paddle/fluid/framework.py b/python/paddle/fluid/framework.py index 3af32b930cf..55e67327ec4 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 -- GitLab