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
OpNode
struct OpNode
An operation in the Loop Dependency Graph (LDG).
Enriches OpDesc with resource assignment and latency β the information needed for modulo scheduling (GAG96). Each OpNode represents one vertex in the LDG:
- resource: which hardware unit executes this op (from OpDesc.resource)
- latency: estimated cycles until the result is available
- op: the underlying OpDesc with kind, stage, subtile, etc.
Latencies are approximate and used for scheduling heuristics (ASAP/ALAP priority), not for cycle-accurate simulation. Typical values:
GLOBAL_MEM (buffer_load β LDS): ~200 cycles LDS (ds_read β register): ~20 cycles MMA_UNIT (MFMA execution): ~16 cycles SCALAR (barriers, fences): ~0 cycles (sync, not compute)
Fieldsβ
- βop (
OpDesc): - βresource (
ResourceKind): - βlatency (
Int):
Implemented traitsβ
AnyType,
Copyable,
ImplicitlyCopyable,
ImplicitlyDestructible,
Movable
Methodsβ
__init__β
__init__(out self, *, op: OpDesc, latency: Int = -1)
Create an OpNode from an OpDesc.
If latency is -1 (default), it is auto-derived from op.latency. Pass an explicit value to override.
Was this page helpful?
Thank you! We'll create more content like this.
Thank you for helping us improve!