未验证 提交 136ef09d 编写于 作者: Z Zhang Ting 提交者: GitHub

add detail for gpu_id, document_fix (#32444)

上级 83580ee6
......@@ -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
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册