pub struct SchedulerWarpConfig {
pub scheduler_warp_id: u32,
pub scheduler: SchedulerConfig,
pub work_queue_capacity: usize,
pub poll_interval_ns: u32,
}Expand description
Configuration for the scheduler warp pattern in CUDA codegen.
This controls how the scheduler warp (warp 0 by default) is generated within each persistent kernel thread block. When enabled, the codegen produces a split: warp 0 handles work distribution, remaining warps do message processing.
Fields§
§scheduler_warp_id: u32Which warp handles scheduling (default: 0).
scheduler: SchedulerConfigThe scheduling parameters.
work_queue_capacity: usizeSize of the global work queue (number of WorkItem slots). Must be power of 2. Used for round-robin and priority strategies.
poll_interval_ns: u32Polling interval in nanoseconds for the scheduler warp when no work is available (default: 1000ns).
Implementations§
Source§impl SchedulerWarpConfig
impl SchedulerWarpConfig
Sourcepub fn new(scheduler: SchedulerConfig) -> Self
pub fn new(scheduler: SchedulerConfig) -> Self
Create a new scheduler warp config with the given strategy.
Sourcepub fn disabled() -> Self
pub fn disabled() -> Self
Create a static (disabled) scheduler warp config. Codegen will produce the original non-split kernel.
Sourcepub fn with_scheduler_warp(self, warp_id: u32) -> Self
pub fn with_scheduler_warp(self, warp_id: u32) -> Self
Set the scheduler warp ID.
Sourcepub fn with_work_queue_capacity(self, capacity: usize) -> Self
pub fn with_work_queue_capacity(self, capacity: usize) -> Self
Set the global work queue capacity.
Sourcepub fn with_poll_interval_ns(self, ns: u32) -> Self
pub fn with_poll_interval_ns(self, ns: u32) -> Self
Set the poll interval for the scheduler warp.
Sourcepub fn is_enabled(&self) -> bool
pub fn is_enabled(&self) -> bool
Check if the scheduler warp pattern should be generated.
Trait Implementations§
Source§impl Clone for SchedulerWarpConfig
impl Clone for SchedulerWarpConfig
Source§fn clone(&self) -> SchedulerWarpConfig
fn clone(&self) -> SchedulerWarpConfig
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more