cuda.core.system.RegisteredSystemEvents#

class cuda.core.system.RegisteredSystemEvents(
events: SystemEventType | int | list[SystemEventType | int],
)#

Represents a set of events that can be waited on for a specific device.

Methods

__init__(*args, **kwargs)#
wait(
self,
int timeout_ms: int = 0,
int buffer_size: int = 1,
) SystemEvents#

Wait for events in the system event set.

For Fermi™ or newer fully supported devices.

If some events are ready to be delivered at the time of the call, function returns immediately. If there are no events ready to be delivered, function sleeps till event arrives but not longer than specified timeout. If timeout passes, a cuda.core.system.TimeoutError is raised. This function in certain conditions can return before specified timeout passes (e.g. when interrupt arrives)

Parameters:
  • timeout_ms (int) – The timeout in milliseconds. A value of 0 means to wait indefinitely.

  • buffer_size (int) – The maximum number of events to retrieve. Must be at least 1.

Raises:
  • cuda.core.system.TimeoutError – If the timeout expires before an event is received.

  • cuda.core.system.GpuIsLostError – If the GPU has fallen off the bus or is otherwise inaccessible.