pub struct KernelExecution {
pub name: String,
pub grid_dim: (u32, u32, u32),
pub block_dim: (u32, u32, u32),
pub shared_mem_bytes: usize,
pub registers_per_thread: u32,
pub occupancy_pct: f64,
pub elapsed_ms: f64,
pub status: KernelStatus,
pub device_id: DeviceId,
pub start_time: Instant,
}Expand description
Active kernel execution
Fields§
§name: StringKernel name
grid_dim: (u32, u32, u32)Grid dimensions (x, y, z)
block_dim: (u32, u32, u32)Block dimensions (x, y, z)
Shared memory per block in bytes
registers_per_thread: u32Registers per thread
occupancy_pct: f64Theoretical occupancy percentage
elapsed_ms: f64Elapsed time in milliseconds
status: KernelStatusExecution status
device_id: DeviceIdDevice executing this kernel
start_time: InstantStart time
Implementations§
Source§impl KernelExecution
impl KernelExecution
Sourcepub fn new(name: impl Into<String>, device_id: DeviceId) -> Self
pub fn new(name: impl Into<String>, device_id: DeviceId) -> Self
Create a new kernel execution tracker
Sourcepub fn with_dims(self, grid: (u32, u32, u32), block: (u32, u32, u32)) -> Self
pub fn with_dims(self, grid: (u32, u32, u32), block: (u32, u32, u32)) -> Self
Set grid and block dimensions
Set shared memory usage
Sourcepub fn with_registers(self, regs: u32) -> Self
pub fn with_registers(self, regs: u32) -> Self
Set register usage
Sourcepub fn total_threads(&self) -> u64
pub fn total_threads(&self) -> u64
Get total thread count
Sourcepub fn total_blocks(&self) -> u64
pub fn total_blocks(&self) -> u64
Get total blocks
Sourcepub fn threads_per_block(&self) -> u32
pub fn threads_per_block(&self) -> u32
Get threads per block
Sourcepub fn update_elapsed(&mut self)
pub fn update_elapsed(&mut self)
Update elapsed time for running kernel
Sourcepub fn progress_pct(&self) -> f64
pub fn progress_pct(&self) -> f64
Get progress percentage (estimated based on time if available)
Trait Implementations§
Source§impl Clone for KernelExecution
impl Clone for KernelExecution
Source§fn clone(&self) -> KernelExecution
fn clone(&self) -> KernelExecution
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for KernelExecution
impl RefUnwindSafe for KernelExecution
impl Send for KernelExecution
impl Sync for KernelExecution
impl Unpin for KernelExecution
impl UnsafeUnpin for KernelExecution
impl UnwindSafe for KernelExecution
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
Mutably borrows from an owned value. Read more