For the complete documentation index, see llms.txt. Markdown versions of all pages are available by appending .md to any URL (e.g. /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,
Deinitable,
ImplicitlyCopyable,
Movable
Methods
__init__
def __init__(out self, producer_idx: Int, consumer_idx: Int, dep_kind: DepKind, loop_distance: Int = Int(0))
flow
static def flow(producer: Int, consumer: Int, loop_distance: Int = Int(0)) -> Self
anti
static def anti(producer: Int, consumer: Int, loop_distance: Int = Int(0)) -> Self