评价此页

torch.cuda.set_stream#

torch.cuda.set_stream(stream)[源代码]#
设置当前流。这是一个用于设置流的包装 API。

Usage of this function is discouraged in favor of the stream context manager.

参数

stream (Stream) – 选择的流。如果此参数为 None,则此函数不执行任何操作。