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 * dFor d=0 (same iteration), this simplifies to the existing check:
time_slot(consumer) > time_slot(producer)Fieldsβ
- βproducer_idx (
Int): Index of the producing entry in its phase's entry list. - βconsumer_idx (
Int): Index of the consuming entry in its phase's entry list. - βdep_kind (
DepKind): Type of dependency (FLOW,ANTI, orOUTPUT). - βloop_distance (
Int): Loop iterations between producer and consumer (0= same iteration).
Implemented traitsβ
AnyType,
Copyable,
ImplicitlyCopyable,
ImplicitlyDeletable,
Movable
Methodsβ
__init__β
def __init__(out self, producer_idx: Int, consumer_idx: Int, dep_kind: DepKind, loop_distance: Int = 0)
flowβ
static def flow(producer: Int, consumer: Int, loop_distance: Int = 0) -> Self
antiβ
static def 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!