pub struct GpuProfiler { /* private fields */ }Expand description
GPU profiling manager
Implementations§
Source§impl GpuProfiler
impl GpuProfiler
Sourcepub fn new(
device: Arc<Device>,
queue: Arc<Queue>,
config: ProfilingConfig,
) -> Result<Self>
pub fn new( device: Arc<Device>, queue: Arc<Queue>, config: ProfilingConfig, ) -> Result<Self>
Create a new GPU profiler
Sourcepub fn begin_profile(&self, label: &str) -> ProfileSession
pub fn begin_profile(&self, label: &str) -> ProfileSession
Start profiling a kernel execution
Sourcepub fn record_kernel_execution(
&self,
label: &str,
duration: Duration,
memory_bytes: u64,
compute_units: u32,
)
pub fn record_kernel_execution( &self, label: &str, duration: Duration, memory_bytes: u64, compute_units: u32, )
Record kernel execution metrics
Sourcepub fn record_memory_transfer(
&self,
bytes: u64,
duration: Duration,
host_to_device: bool,
)
pub fn record_memory_transfer( &self, bytes: u64, duration: Duration, host_to_device: bool, )
Record memory transfer
Sourcepub fn get_metrics(&self) -> ProfilingMetrics
pub fn get_metrics(&self) -> ProfilingMetrics
Get current metrics
Sourcepub fn generate_report(&self) -> ProfilingReport
pub fn generate_report(&self) -> ProfilingReport
Generate profiling report
Sourcepub fn timestamp_period(&self) -> f32
pub fn timestamp_period(&self) -> f32
Get timestamp period in nanoseconds
Sourcepub fn detect_bottlenecks(&self) -> Vec<PerformanceBottleneck>
pub fn detect_bottlenecks(&self) -> Vec<PerformanceBottleneck>
Detect performance bottlenecks
Trait Implementations§
Source§impl Clone for GpuProfiler
impl Clone for GpuProfiler
Source§fn clone(&self) -> GpuProfiler
fn clone(&self) -> GpuProfiler
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 GpuProfiler
impl !RefUnwindSafe for GpuProfiler
impl Send for GpuProfiler
impl Sync for GpuProfiler
impl Unpin for GpuProfiler
impl UnsafeUnpin for GpuProfiler
impl !UnwindSafe for GpuProfiler
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