评价此页

StreamContext#

class torch.cuda.StreamContext(stream)[source]#

选择给定流的上下文管理器。

All CUDA kernels queued within its context will be enqueued on a selected stream.

参数

Stream (Stream) – selected stream. This manager is a no-op if it’s None.

注意

Streams are per-device.