Stream¶
- class paddle.device.cuda. Stream [source]
-
The handle of the CUDA stream.
- Parameters
-
device (paddle.CUDAPlace()|int|None, optional) – The device which wanted to allocate the stream.
integer (If device is positive) –
device. (device will be the current) –
integer – None.
Default (it must less than the device count.) – None.
priority (int|None, optional) – The priority of stream. The priority can be 1(high) or 2(normal).
None (If priority is) – None.
2 (the priority is) – None.
Examples
# required: gpu import paddle s1 = paddle.device.cuda.Stream(paddle.CUDAPlace(0), 1) s2 = paddle.device.cuda.Stream(0, 1) s3 = paddle.device.cuda.Stream()