pub struct LaunchTelemetry {
pub kernel_name: String,
pub grid_dim: (u32, u32, u32),
pub block_dim: (u32, u32, u32),
pub shared_memory_bytes: u32,
pub register_count: Option<u32>,
pub elapsed_ms: Option<f64>,
pub achieved_occupancy: Option<f64>,
pub theoretical_occupancy: Option<f64>,
pub timestamp: Instant,
}Expand description
Telemetry data collected after a single kernel launch.
Records dimensions, timing, occupancy, and register usage.
Use the builder methods (with_*) to set optional fields after
constructing with LaunchTelemetry::new.
Fields§
§kernel_name: StringName of the launched kernel.
grid_dim: (u32, u32, u32)Grid dimensions (x, y, z).
block_dim: (u32, u32, u32)Block dimensions (x, y, z).
Dynamic shared memory allocated in bytes.
register_count: Option<u32>Number of registers used per thread, if known.
elapsed_ms: Option<f64>GPU-side elapsed time in milliseconds, if measured.
achieved_occupancy: Option<f64>Achieved occupancy (0.0..=1.0), if measured.
theoretical_occupancy: Option<f64>Theoretical occupancy (0.0..=1.0), if computed.
timestamp: InstantWall-clock timestamp when the telemetry was recorded.
Implementations§
Source§impl LaunchTelemetry
impl LaunchTelemetry
Sourcepub fn new(
kernel_name: &str,
grid_dim: (u32, u32, u32),
block_dim: (u32, u32, u32),
) -> Self
pub fn new( kernel_name: &str, grid_dim: (u32, u32, u32), block_dim: (u32, u32, u32), ) -> Self
Creates a new telemetry entry with the given kernel name and dimensions.
Optional fields default to None / 0. Use the with_* builder
methods to set them.
Sets the dynamic shared memory allocation.
Sourcepub fn with_register_count(self, count: u32) -> Self
pub fn with_register_count(self, count: u32) -> Self
Sets the register count per thread.
Sourcepub fn with_elapsed_ms(self, ms: f64) -> Self
pub fn with_elapsed_ms(self, ms: f64) -> Self
Sets the GPU-side elapsed time in milliseconds.
Sourcepub fn with_achieved_occupancy(self, occ: f64) -> Self
pub fn with_achieved_occupancy(self, occ: f64) -> Self
Sets the achieved occupancy (0.0..=1.0).
Sourcepub fn with_theoretical_occupancy(self, occ: f64) -> Self
pub fn with_theoretical_occupancy(self, occ: f64) -> Self
Sets the theoretical occupancy (0.0..=1.0).
Sourcepub fn total_threads(&self) -> u64
pub fn total_threads(&self) -> u64
Total number of threads launched (grid_total * block_total).
Trait Implementations§
Source§impl Clone for LaunchTelemetry
impl Clone for LaunchTelemetry
Source§fn clone(&self) -> LaunchTelemetry
fn clone(&self) -> LaunchTelemetry
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more