pub struct SectionSpan {
pub name: String,
pub stages: (usize, usize),
pub buffers: (usize, usize),
pub edges: (usize, usize),
pub semaphores: (usize, usize),
pub items: (usize, usize),
pub plan: Option<BlockPlan>,
pub k_tiles: usize,
pub output: Option<TensorId>,
pub barrier_after: Option<Rendezvous>,
}Expand description
One SECTION of a composed program: the half-open range this section owns in every id space, the plan and work list it was lowered under, the tensor it writes, and the rendezvous every engine passes through before the next section begins.
★ A SECTION IS A SCOPE, NOT A LABEL. Three invariants read the spans rather than the whole program, and each is wrong without them: output coverage is counted over the section’s OWN work items (the union across sections would report every tile stored a hundred times), local memory may be REUSED across sections and must not overlap within one (which is the whole point of a persistent decoder), and the item loop of an engine program indexes the items of the section the op belongs to.
Fields§
§name: String§stages: (usize, usize)Half-open [start, end) in the composed program’s stage list.
buffers: (usize, usize)§edges: (usize, usize)§semaphores: (usize, usize)§items: (usize, usize)§plan: Option<BlockPlan>§k_tiles: usize§output: Option<TensorId>The tensor this section writes (its result).
barrier_after: Option<Rendezvous>The rendezvous every engine program passes through between its last op of this section and its
first op of the next. None on the last section, which has nothing to be ordered before.
Implementations§
Source§impl SectionSpan
impl SectionSpan
pub fn holds_stage(&self, s: StageId) -> bool
pub fn holds_buffer(&self, b: BufferId) -> bool
pub fn holds_item(&self, i: WorkItemId) -> bool
Trait Implementations§
Source§impl Clone for SectionSpan
impl Clone for SectionSpan
Source§fn clone(&self) -> SectionSpan
fn clone(&self) -> SectionSpan
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for SectionSpan
impl Debug for SectionSpan
Source§impl<'de> Deserialize<'de> for SectionSpan
impl<'de> Deserialize<'de> for SectionSpan
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>,
Source§impl PartialEq for SectionSpan
impl PartialEq for SectionSpan
Source§impl Serialize for SectionSpan
impl Serialize for SectionSpan
impl Eq for SectionSpan
impl StructuralPartialEq for SectionSpan
Auto Trait Implementations§
impl Freeze for SectionSpan
impl RefUnwindSafe for SectionSpan
impl Send for SectionSpan
impl Sync for SectionSpan
impl Unpin for SectionSpan
impl UnsafeUnpin for SectionSpan
impl UnwindSafe for SectionSpan
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.