python_vali.CudaStreamEvent¶
- class python_vali.CudaStreamEvent¶
CUDA stream synchronization event
- __init__(self: python_vali._python_vali.CudaStreamEvent, stream: int, gpu_id: int) None ¶
Create a new CUDA stream event.
Initializes a CUDA event for synchronizing operations on a specific CUDA stream and GPU.
- Parameters:
stream (int) – CUDA stream handle to associate with the event
gpu_id (int) – GPU device ID to use
Methods
Record
(self)Record the current state of the CUDA stream.
Wait
(self)Wait for the recorded event to complete.
__init__
(self, stream, gpu_id)Create a new CUDA stream event.
- Record(self: python_vali._python_vali.CudaStreamEvent) None ¶
Record the current state of the CUDA stream.
Creates a synchronization point in the CUDA stream. Equivalent to cuEventRecord in the CUDA API.
- Note:
This operation is asynchronous and returns immediately
- Wait(self: python_vali._python_vali.CudaStreamEvent) None ¶
Wait for the recorded event to complete.
Blocks until all operations in the CUDA stream up to the recorded event have completed. Equivalent to cuEventSynchronize in the CUDA API.
- Note:
This operation is synchronous and will block until completion