Skip to main content

Module device_actor

Module device_actor 

Source
Expand description

DeviceActor — the outer tier of the §5.11 two-tier supervision tree.

Responsibilities:

  • Stable address: ActorRef<DeviceMsg> survives unlimited ContextActor restarts.
  • Spawns the ContextActor child (which owns the Arc<CudaContext>) and queues WorkRequests while the context is being (re)built.
  • Holds the shared Arc<DeviceState> that outlives any single ContextActor incarnation.

Structs§

DeviceActor
DeviceConfig
Public configuration for a DeviceActor.
EnabledLibraries
Per-device opt-in flags for which library actors to spawn. Compile-time feature = "..." gates still apply — a flag for a library that wasn’t compiled in is silently ignored.
KernelChildren
Set of kernel-actor refs spawned by a ContextActor. Each is Some only when both the cargo feature is compiled in and the DeviceConfig::enabled_libraries flag is set.
SgemmRequest
Body of a DeviceMsg::Sgemm request. Boxed because it’s larger than the surrounding enum’s other variants and we want the enum cheap to clone/send. reply is oneshot, so each request must be unique.

Enums§

DeviceMsg
Public messages sent to a DeviceActor.
WorkRequest
Pending work item — anything DeviceActor stashes while the context is not ready. Mirrors the user-facing variants of DeviceMsg minus internal messages.