pub struct KernelProfiler { /* private fields */ }Expand description
High-level kernel profiling helper.
Records kernel executions, memory transfers, and synchronization
events into a TraceRecorder.
Implementations§
Source§impl KernelProfiler
impl KernelProfiler
Sourcepub fn new(recorder: &TraceRecorder) -> Self
pub fn new(recorder: &TraceRecorder) -> Self
Create a new kernel profiler backed by the given recorder.
Sourcepub fn profile_kernel(
&self,
name: &str,
grid: (u32, u32, u32),
block: (u32, u32, u32),
shared_mem: u32,
duration_us: f64,
)
pub fn profile_kernel( &self, name: &str, grid: (u32, u32, u32), block: (u32, u32, u32), shared_mem: u32, duration_us: f64, )
Record a completed kernel execution.
Sourcepub fn profile_memcpy(&self, direction: &str, bytes: usize, duration_us: f64)
pub fn profile_memcpy(&self, direction: &str, bytes: usize, duration_us: f64)
Record a completed memory copy.
Sourcepub fn profile_sync(&self, stream_id: u64, duration_us: f64)
pub fn profile_sync(&self, stream_id: u64, duration_us: f64)
Record a completed stream synchronization.
Auto Trait Implementations§
impl Freeze for KernelProfiler
impl RefUnwindSafe for KernelProfiler
impl Send for KernelProfiler
impl Sync for KernelProfiler
impl Unpin for KernelProfiler
impl UnsafeUnpin for KernelProfiler
impl UnwindSafe for KernelProfiler
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