pub struct OccupancyEstimate {
pub theoretical_occupancy: f32,
pub active_warps: u32,
pub max_warps: u32,
}Expand description
Occupancy estimate for a single kernel on a given SM configuration.
Fields§
§theoretical_occupancy: f32Fraction of SM warp slots that would be active (0.0 – 1.0).
active_warps: u32Number of warps the kernel uses.
max_warps: u32Maximum warps the SM can hold concurrently.
Implementations§
Source§impl OccupancyEstimate
impl OccupancyEstimate
Sourcepub fn compute(kernel: &KernelSpec, sm_warp_limit: u32, warp_size: u32) -> Self
pub fn compute(kernel: &KernelSpec, sm_warp_limit: u32, warp_size: u32) -> Self
Compute occupancy for kernel on an SM with sm_warp_limit warp slots.
Warp count is derived from threads_per_group / warp_size (rounded up),
multiplied by work_groups (capped at sm_warp_limit).
warp_size is typically 32 on NVIDIA hardware; 64 on AMD.
Trait Implementations§
Source§impl Clone for OccupancyEstimate
impl Clone for OccupancyEstimate
Source§fn clone(&self) -> OccupancyEstimate
fn clone(&self) -> OccupancyEstimate
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 OccupancyEstimate
impl RefUnwindSafe for OccupancyEstimate
impl Send for OccupancyEstimate
impl Sync for OccupancyEstimate
impl Unpin for OccupancyEstimate
impl UnsafeUnpin for OccupancyEstimate
impl UnwindSafe for OccupancyEstimate
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more