pub enum IrViolation {
Show 59 variants
IdNotDense {
what: &'static str,
index: usize,
},
DanglingTensor {
stage: StageId,
tensor: TensorId,
},
DanglingBuffer {
stage: Option<StageId>,
buffer: BufferId,
},
DanglingStage {
edge: EdgeId,
stage: StageId,
},
DanglingGroup {
stage: StageId,
group: GroupId,
},
DanglingSemaphore {
sem: SemId,
},
DanglingItem {
stage: StageId,
item: WorkItemId,
},
EdgeBufferNotInStagePorts {
edge: EdgeId,
stage: StageId,
buffer: BufferId,
},
FifoProducerCount {
buffer: BufferId,
count: usize,
},
FifoConsumerCount {
buffer: BufferId,
count: usize,
},
CarryWithoutInit {
buffer: BufferId,
},
CarryUpdatedTwice {
buffer: BufferId,
},
CarryInitMovesWithTheBlocks {
buffer: BufferId,
},
CarryNotARing {
buffer: BufferId,
},
LoadReadsOutput {
stage: StageId,
tensor: TensorId,
},
StoreWritesInput {
stage: StageId,
tensor: TensorId,
},
TileGridMismatch {
tensor: TensorId,
},
OutputUncovered {
tensor: TensorId,
tile: usize,
},
OutputOverlap {
tensor: TensorId,
tile: usize,
},
OperandDtypeMismatch {
stage: StageId,
buffer: BufferId,
expected: Precision,
found: Precision,
},
IntermNarrowerThanAcc {
stage: StageId,
interm: BufferId,
acc: AccPolicy,
found: Precision,
},
AccTilesExceeded {
stage: StageId,
needed: usize,
available: usize,
},
BlockDivisibility {
what: &'static str,
value: usize,
divisor: usize,
},
GridMismatch {
expected: (usize, usize),
found: (usize, usize),
},
PhaseOrder {
have: &'static str,
missing: &'static str,
},
StageUnplaced {
stage: StageId,
},
EngineRoleMismatch {
stage: StageId,
},
EngineSiteMismatch {
stage: StageId,
},
GroupMalformed {
group: GroupId,
reason: &'static str,
},
GroupMemberMismatch {
group: GroupId,
site: Site,
reason: &'static str,
},
CrossSiteLocalEdge {
edge: EdgeId,
},
LocalCrossSiteEdge {
edge: EdgeId,
},
MemoryOverlap {
site: Site,
a: BufferId,
b: BufferId,
},
MemoryUnmapped {
buffer: BufferId,
},
DuplicateEngineProgram {
site: Site,
engine: Engine,
},
CountingImbalance {
buffer: BufferId,
reserved: u64,
pushed: u64,
popped: u64,
},
AccumulatorNeverComputed {
site: Site,
engine: Engine,
},
SemaphoreImbalance {
sem: SemId,
incs: u64,
waits: u64,
},
SemaphoreNotReset {
sem: SemId,
waits: u64,
resets: u64,
},
AccImbalance {
site: Site,
acquires: u64,
releases: u64,
},
HandshakeNotRequired {
kind: HandshakeKind,
},
ItemCountMismatch {
group: GroupId,
},
StageNotScheduled {
stage: StageId,
op: &'static str,
},
GenericOperandCount {
stage: StageId,
operands: usize,
maps: usize,
},
GenericOperandOutOfRange {
stage: StageId,
operand: usize,
operands: usize,
},
ContractionMalformed {
stage: StageId,
reason: &'static str,
},
IndirectOperandOutOfRange {
stage: StageId,
operand: usize,
operands: usize,
},
IndirectMalformed {
stage: StageId,
reason: &'static str,
},
TripMalformed {
trip: TripId,
reason: &'static str,
},
TripLoopMalformed {
reason: &'static str,
},
IndirectOutWithoutScatter {
stage: StageId,
},
IndirectIndexNotAnOperand {
stage: StageId,
buffer: BufferId,
},
ArgMaxOutputNotInteger {
stage: StageId,
found: Precision,
},
TensorRoleDeferred {
tensor: TensorId,
role: TensorRole,
until: &'static str,
},
TensorSpaceDeferred {
tensor: TensorId,
space: TensorSpace,
until: &'static str,
},
SectionSpanMalformed {
section: usize,
what: &'static str,
},
SectionBarrierUnbalanced {
sem: SemId,
participants: usize,
sites: usize,
incs: u64,
wait_ops: u64,
},
SectionBarrierMisplaced {
section: usize,
site: Site,
engine: Engine,
what: &'static str,
},
SectionBufferEscape {
stage: StageId,
buffer: BufferId,
stage_section: usize,
buffer_section: usize,
},
}Expand description
A structural invariant the program breaks. Every arm is a lock.
Variants§
IdNotDense
DanglingTensor
DanglingBuffer
DanglingStage
DanglingGroup
DanglingSemaphore
DanglingItem
EdgeBufferNotInStagePorts
FifoProducerCount
FifoConsumerCount
CarryWithoutInit
A carried buffer — one stage reads and writes it — that no other stage writes first.
CarryUpdatedTwice
A carried buffer more than one stage updates, or more than one stage initializes.
CarryInitMovesWithTheBlocks
A carry’s init that reads a value moving with the K blocks: the first page would differ per block.
CarryNotARing
A carry that is not a scratch ring of two pages — the value before a block’s update and the value after.
LoadReadsOutput
StoreWritesInput
TileGridMismatch
OutputUncovered
OutputOverlap
OperandDtypeMismatch
IntermNarrowerThanAcc
AccTilesExceeded
BlockDivisibility
GridMismatch
PhaseOrder
StageUnplaced
EngineRoleMismatch
EngineSiteMismatch
GroupMalformed
GroupMemberMismatch
CrossSiteLocalEdge
LocalCrossSiteEdge
MemoryOverlap
MemoryUnmapped
DuplicateEngineProgram
CountingImbalance
AccumulatorNeverComputed
An accumulator was acquired and packed with no compute in between (a skipped compute is never a legal choreography: the packed tiles would be whatever the register file held).
SemaphoreImbalance
SemaphoreNotReset
A counting semaphore was waited on without being put back to zero for the next round — the next wait would be satisfied by a count that has already been consumed.
AccImbalance
HandshakeNotRequired
Fields
kind: HandshakeKindItemCountMismatch
StageNotScheduled
A stage the output-coverage proof credits issues no data movement in the schedule. Coverage is proven over the WORK LIST; the schedule is what runs.
GenericOperandCount
A Generic whose access maps do not match its operands one for one.
GenericOperandOutOfRange
A Generic body (or a predicate’s bound) naming an operand the stage does not have — the
evaluator indexes pages by it, and a panic there is not a refusal.
ContractionMalformed
A Generic whose contraction axis — the third iteration variable, LV_GEN_K — is malformed: not a sum fold,
over another variable, stepped along by the output or by a map in a space without it, or a fourth axis.
IndirectOperandOutOfRange
An indirect term whose index operand the stage does not have.
IndirectMalformed
An indirect term or tile with a field that cannot mean anything (a zero modulus or stride, an inverted bound).
TripMalformed
A trip that cannot count anything: read from what is not a program input or past its tensor, an empty or zero-based range, a zero divisor, or a trip no loop runs to.
TripLoopMalformed
A loop that misuses a trip: runs to one the program does not declare, is bounded apart from it, nests inside
another trip loop, or holds a semaphore or multicast op — the forms the certificate’s trip window
(crate::spatial::certificate::trip_window) does not cover.
IndirectOutWithoutScatter
An OUTPUT map with an indirect term — a scatter — on a stage whose result reaches no Store with an indirect tile address to scatter through.
IndirectIndexNotAnOperand
An indirect tile address whose index buffer is not one of the stage’s operands.
ArgMaxOutputNotInteger
An index-valued (ArgMax) reduction packed into a non-integer buffer.
TensorRoleDeferred
A tensor role used outside the contract that gives it meaning; until names the phase that
owns that contract (B-P7 sections for an activation, B-P6 the cross-token carry for state).
TensorSpaceDeferred
A tensor space used outside the contract that gives it meaning; until names the phase.
SectionSpanMalformed
A section span that is not a scope: an id range that overlaps its neighbour, runs backwards, or leaves part of an id space in no section at all.
SectionBarrierUnbalanced
A section boundary whose barrier is not a rendezvous: the participants that post it and the engine programs that wait on it disagree.
SectionBarrierMisplaced
A rendezvous op that does not sit on its section boundary in one engine program, so the barrier balances but does not order that program’s work.
SectionBufferEscape
A stage of one section reads or writes a buffer that belongs to another — sections share tensors, never local memory.
Trait Implementations§
Source§impl Clone for IrViolation
impl Clone for IrViolation
Source§fn clone(&self) -> IrViolation
fn clone(&self) -> IrViolation
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for IrViolation
impl Debug for IrViolation
Source§impl From<IrViolation> for ComposeReject
impl From<IrViolation> for ComposeReject
Source§fn from(v: IrViolation) -> Self
fn from(v: IrViolation) -> Self
Source§impl From<IrViolation> for SpatialReject
impl From<IrViolation> for SpatialReject
Source§fn from(v: IrViolation) -> Self
fn from(v: IrViolation) -> Self
Source§impl PartialEq for IrViolation
impl PartialEq for IrViolation
Source§impl Serialize for IrViolation
impl Serialize for IrViolation
impl Eq for IrViolation
impl StructuralPartialEq for IrViolation
Auto Trait Implementations§
impl Freeze for IrViolation
impl RefUnwindSafe for IrViolation
impl Send for IrViolation
impl Sync for IrViolation
impl Unpin for IrViolation
impl UnsafeUnpin for IrViolation
impl UnwindSafe for IrViolation
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.