pub struct BlockPlan {
pub per_site_m: usize,
pub per_site_n: usize,
pub grid: (usize, usize),
pub inner: InnerLoop,
pub block: BlockShape,
pub acc: AccPolicy,
pub pack_accumulate: bool,
pub engines: EnginePacking,
pub granularity: Granularity,
}Expand description
The per-site block plan the tile pass fixes.
Fields§
§per_site_m: usize§per_site_n: usize§grid: (usize, usize)(n_y, n_x) blocks.
inner: InnerLoop§block: BlockShape§acc: AccPolicy§pack_accumulate: boolThe packer accumulates partial sums in place in the intermediate buffer, so the register file is reloaded once (at the last K block) instead of once per block.
engines: EnginePackingHow the site’s movement work is packed onto its engines.
granularity: GranularityWhether the compute engine is handed a whole sub-block per call or one tile at a time.
Implementations§
Source§impl BlockPlan
impl BlockPlan
Sourcepub fn site_block(
&self,
mt: usize,
nt: usize,
i: usize,
j: usize,
) -> (usize, usize, usize, usize)
pub fn site_block( &self, mt: usize, nt: usize, i: usize, j: usize, ) -> (usize, usize, usize, usize)
★ THE BLOCK THE SITE AT GRID POSITION (i, j) ACTUALLY COVERS — one definition, shared.
A grid extent need not divide the tile count: the last row and column carry what is LEFT. place
emits each site’s patterns from this and work prices them from the same function, because two
copies of a boundary rule disagree the first time either moves — and a planner that ranks by a
closed form the emitter does not honour is the defect this campaign already removed once.
The sub-block must DIVIDE the extent it walks, or the store writes past a row and wraps into the next. Raggedness must not compound, so the largest divisor of the extent that is no bigger than the nominal sub-block is taken; 1 always divides, so a legal choice always exists.
Returns (rows, cols, sub_block_h, sub_block_w). On a grid whose extents DO divide, every site
returns the nominal block and this is the identity.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for BlockPlan
impl<'de> Deserialize<'de> for BlockPlan
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
impl Copy for BlockPlan
impl Eq for BlockPlan
impl StructuralPartialEq for BlockPlan
Auto Trait Implementations§
impl Freeze for BlockPlan
impl RefUnwindSafe for BlockPlan
impl Send for BlockPlan
impl Sync for BlockPlan
impl Unpin for BlockPlan
impl UnsafeUnpin for BlockPlan
impl UnwindSafe for BlockPlan
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§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>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.§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>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.§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.§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.§impl<T> DowncastSync for T
impl<T> DowncastSync for T
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.