Event¶
- class paddle.device.cuda. Event [source]
-
The handle of the CUDA event.
- Parameters
-
enable_timing (bool, optional) – Whether the event will measure time. Default: False.
blocking (bool, optional) – Whether the wait() func will be blocking. Default: False;
interprocess (bool, optional) – Whether the event can be shared between processes. Defalut: False.
Examples
# required: gpu import paddle event = paddle.device.cuda.Event()
-
query
(
self: paddle.fluid.core_avx.CUDAEvent
)
bool
query¶
-
Queries the event’s status.
Returns: A boolean which indicates all work currently captured by the event has been completed.
Examples
# required: gpu import paddle event = paddle.device.cuda.Event() is_done = event.query()
-
record
(
self: paddle.fluid.core_avx.CUDAEvent,
stream: paddle.fluid.core_avx.CUDAStream = None
)
None
record¶
-
Records the event in the given stream.
- Parameters
-
stream (CUDAStream, optional) – The handle of CUDA stream. If None, the stream is the current stream. Default: None.
Examples
# required: gpu import paddle event = paddle.device.cuda.Event() event.record()