Skip to content

Latest commit

 

History

History
18 lines (11 loc) · 412 Bytes

stream_guard_cn.rst

File metadata and controls

18 lines (11 loc) · 412 Bytes

stream_guard

.. py:function:: paddle.device.cuda.stream_guard(stream)

可以切换当前的CUDA stream为输入指定的stream。

参数

  • stream (paddle.device.cuda.Stream) - 指定的CUDA stream。如果为None,则不进行stream流切换。

代码示例

COPY-FROM: paddle.device.cuda.stream_guard