Skip to main content

Module kernel_scheduler

Module kernel_scheduler 

Source
Expand description

GPU kernel scheduling simulation.

Simulates the kernel dispatch pipeline found in modern GPU compute stacks. Key concepts modelled:

  • Kernel dependency graph – a directed acyclic graph where edges encode “must finish before” relationships between kernels.
  • Launch ordering – topological ordering of the DAG that respects all dependencies, choosing lexicographic tie-breaking for determinism.
  • Occupancy estimation – computes theoretical occupancy (0.0–1.0) from active warps vs the SM warp limit.
  • Warp utilisation – tracks active vs stalled warps per kernel to produce a utilisation metric.

All structures are pure-Rust, CPU-side simulations that mirror GPU scheduler semantics without requiring actual GPU hardware.

Structs§

KernelScheduler
Kernel dependency graph and launch-order scheduler.
KernelSpec
Specification for a single compute kernel.
OccupancyEstimate
Occupancy estimate for a single kernel on a given SM configuration.
WarpStats
Per-kernel warp utilisation statistics gathered after (simulated) execution.

Enums§

SchedulerError
Errors returned by kernel scheduler operations.