For the complete documentation index, see llms.txt. Markdown versions of all pages are available by appending .md to any URL (e.g. /max/get-started.md).
Mojo struct
DepEdge
struct DepEdge
A dependency between two schedule entries.
Used for C2 (data dependence) validation: the producer entry must complete before the consumer entry can execute.
From the modulo scheduling paper, each edge in the Loop Dependency Graph
has a loop distance d:
- d=0: same-iteration dependency (producer and consumer in same iter)
- d>=1: loop-carried dependency (consumer reads data from
diters ago)
The C2 constraint with loop distance is: Ο(consumer) - Ο(producer) >= latency(producer) - T * d
For d=0 (same iteration), this simplifies to the existing check: time_slot(consumer) > time_slot(producer)
Fields: producer_idx: Index of the producing entry in its phase's entry list. consumer_idx: Index of the consuming entry in its phase's entry list. dep_kind: Type of dependency (FLOW, ANTI, OUTPUT). loop_distance: Number of loop iterations between producer and consumer. 0 means same iteration, 1 means consumer uses data from previous iteration (e.g., WAR anti-dependency on double-buffered storage).
Fieldsβ
- βproducer_idx (
Int): - βconsumer_idx (
Int): - βdep_kind (
DepKind): - βloop_distance (
Int):
Implemented traitsβ
AnyType,
Copyable,
ImplicitlyCopyable,
ImplicitlyDestructible,
Movable
Methodsβ
__init__β
__init__(out self, producer_idx: Int, consumer_idx: Int, dep_kind: DepKind, loop_distance: Int = 0)
flowβ
static flow(producer: Int, consumer: Int, loop_distance: Int = 0) -> Self
antiβ
static anti(producer: Int, consumer: Int, loop_distance: Int = 0) -> Self
Was this page helpful?
Thank you! We'll create more content like this.
Thank you for helping us improve!