pub struct TaskQueueSnapshot {
pub ready_count: u32,
pub paused_count: u32,
pub yielded_count: u32,
pub requeued_count: u32,
pub running_count: u32,
pub faulted_count: u32,
pub total_requeues: u64,
pub max_priority_age: u32,
}Expand description
Queue telemetry derived from device-visible continuation task slots.
Fields§
§ready_count: u32Count of ready slots.
paused_count: u32Count of paused slots.
yielded_count: u32Count of yielded slots.
requeued_count: u32Count of requeued slots.
running_count: u32Count of running slots.
faulted_count: u32Count of faulted slots.
total_requeues: u64Sum of per-slot requeue counters.
max_priority_age: u32Maximum priority-aging tick observed in the queue.
Implementations§
Source§impl TaskQueueSnapshot
impl TaskQueueSnapshot
Sourcepub fn from_tasks(tasks: &[TaskWorkItem]) -> Result<Self, BackendError>
pub fn from_tasks(tasks: &[TaskWorkItem]) -> Result<Self, BackendError>
Build a queue snapshot from continuation task slots.
§Errors
Returns BackendError when the slice contains an unknown task state or
a count cannot fit the u32 ABI.
Sourcepub fn schedulable_count(&self) -> u32
pub fn schedulable_count(&self) -> u32
Number of slots immediately eligible for GPU scheduling.
Sourcepub fn try_schedulable_count(&self) -> Result<u32, BackendError>
pub fn try_schedulable_count(&self) -> Result<u32, BackendError>
Checked number of slots immediately eligible for GPU scheduling.
§Errors
Returns BackendError when the summed schedulable count exceeds the
u32 launch ABI.
Sourcepub fn continuation_pressure_count(&self) -> u64
pub fn continuation_pressure_count(&self) -> u64
Number of slots carrying continuation pressure.
Sourcepub fn try_continuation_pressure_count(&self) -> Result<u64, BackendError>
pub fn try_continuation_pressure_count(&self) -> Result<u64, BackendError>
Checked number of slots carrying continuation pressure.
§Errors
Returns BackendError when continuation pressure exceeds u64.
Sourcepub fn build_state_convergence_program(
transfer_body: Vec<Node>,
current_buffer: &str,
next_buffer: &str,
changed_buffer: &str,
words: u32,
max_iterations: u32,
) -> Program
pub fn build_state_convergence_program( transfer_body: Vec<Node>, current_buffer: &str, next_buffer: &str, changed_buffer: &str, words: u32, max_iterations: u32, ) -> Program
Build a Program that runs a one-shot persistent fixpoint over the queue snapshot’s state-counter buffer, converging the counts to a stable equilibrium representing the queue’s long-run distribution. Wires the self-substrate persistent fixpoint builder for observability collectors that want stable signals over transient queue jitter.
current_buffer / next_buffer / changed_buffer are
caller-supplied buffer names for the persistent_fixpoint
ping-pong; transfer_body is the per-iteration body that
reads current and writes next. Returns a Program suitable
for one dispatch.
P-RUNTIME-4: replaces a host-side jitter-smoothing loop with a single GPU-side fixpoint dispatch.
Sourcepub fn apply_to_launch_request(
&self,
request: MegakernelLaunchRequest,
) -> MegakernelLaunchRequest
pub fn apply_to_launch_request( &self, request: MegakernelLaunchRequest, ) -> MegakernelLaunchRequest
Merge this queue telemetry into a launch request.
Sourcepub fn try_apply_to_launch_request(
&self,
request: MegakernelLaunchRequest,
) -> Result<MegakernelLaunchRequest, BackendError>
pub fn try_apply_to_launch_request( &self, request: MegakernelLaunchRequest, ) -> Result<MegakernelLaunchRequest, BackendError>
Checked merge of queue telemetry into a launch request.
§Errors
Returns BackendError when schedulable count or continuation pressure
cannot fit the launch request ABI.
Trait Implementations§
Source§impl Clone for TaskQueueSnapshot
impl Clone for TaskQueueSnapshot
Source§fn clone(&self) -> TaskQueueSnapshot
fn clone(&self) -> TaskQueueSnapshot
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for TaskQueueSnapshot
Source§impl Debug for TaskQueueSnapshot
impl Debug for TaskQueueSnapshot
Source§impl Default for TaskQueueSnapshot
impl Default for TaskQueueSnapshot
Source§fn default() -> TaskQueueSnapshot
fn default() -> TaskQueueSnapshot
impl Eq for TaskQueueSnapshot
Source§impl PartialEq for TaskQueueSnapshot
impl PartialEq for TaskQueueSnapshot
Source§fn eq(&self, other: &TaskQueueSnapshot) -> bool
fn eq(&self, other: &TaskQueueSnapshot) -> bool
self and other values to be equal, and is used by ==.impl StructuralPartialEq for TaskQueueSnapshot
Auto Trait Implementations§
impl Freeze for TaskQueueSnapshot
impl RefUnwindSafe for TaskQueueSnapshot
impl Send for TaskQueueSnapshot
impl Sync for TaskQueueSnapshot
impl Unpin for TaskQueueSnapshot
impl UnsafeUnpin for TaskQueueSnapshot
impl UnwindSafe for TaskQueueSnapshot
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.