pub struct MemoryProbe {
pub pool_lines: usize,
pub window_lines: usize,
pub buffer_bytes: usize,
pub cube_count: usize,
pub blocked: bool,
}Expand description
The buffer geometry and launch shape a memory probe uses to move a working set of a given size in one pass.
Shared by the copy and read probes: both walk one line per thread per step over buffers of identical size, and both measure a small working set by moving a small window over a large buffer rather than by allocating a small buffer.
The window is what makes a small working set mean anything. A small buffer read over and over stays in cache after the first pass, so the probe would report cache bandwidth for every size below the cache and the curve would describe residency instead of size. Reading a fresh window each pass keeps the data cold — by the time the window comes back around, a whole buffer of traffic has evicted it — so what varies across the sweep is how much a pass moves, which is the thing being measured.
Fields§
§pool_lines: usizeLines in each buffer: as much as the device will allocate, whatever the working set, so a window has somewhere cold to come back to.
window_lines: usizeLines one pass moves through, per buffer. Never more than
pool_lines; equal to it at the top of the sweep,
where the working set is the whole buffer.
buffer_bytes: usizeBytes in each buffer.
cube_count: usizeCubes to dispatch, which is LaunchConfig::cube_count unless the
window is too small to give every thread a line.
blocked: boolWhether the probe kernels address lines as per-thread contiguous runs rather than coalesced across threads. Set on plane-1 runtimes, where a worker has no plane neighbour to coalesce with.
Implementations§
Source§impl MemoryProbe
impl MemoryProbe
Sourcepub fn new<R: Runtime>(
client: &ComputeClient<R>,
config: LaunchConfig,
line_bytes: usize,
access: MemoryAccess,
working_set: usize,
) -> Self
pub fn new<R: Runtime>( client: &ComputeClient<R>, config: LaunchConfig, line_bytes: usize, access: MemoryAccess, working_set: usize, ) -> Self
Sizes a probe moving working_set bytes per pass, split evenly across
the buffers access touches.
A blocked probe pins the launch to one cube: on the backend that
addressing is for, a cube position is a loop wrapped around the whole
kernel body, n_iter included, so more than one turns the window
rotation between passes into a replay of the same narrow,
blocked-addressed slice instead of a walk across the buffer, and cache
serves it. A coalesced launch spreads one cube position’s addresses
across the full window regardless of cube count, so it has no such
limit.
Trait Implementations§
Source§impl Clone for MemoryProbe
impl Clone for MemoryProbe
Source§fn clone(&self) -> MemoryProbe
fn clone(&self) -> MemoryProbe
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for MemoryProbe
Auto Trait Implementations§
impl Freeze for MemoryProbe
impl RefUnwindSafe for MemoryProbe
impl Send for MemoryProbe
impl Sync for MemoryProbe
impl Unpin for MemoryProbe
impl UnsafeUnpin for MemoryProbe
impl UnwindSafe for MemoryProbe
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneExpand for Twhere
T: Clone,
impl<T> CloneExpand for Twhere
T: Clone,
fn __expand_clone_method(&self, _: &Scope) -> T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>, which can then be
downcast into Box<dyn ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>, which can then be further
downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.Source§impl<T> DowncastSend for T
impl<T> DowncastSend for T
Source§impl<T> DowncastSync for T
impl<T> DowncastSync for T
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> ⓘ
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> ⓘ
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