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 function
annotate_ops
annotate_ops(ops: List[OpDesc], model: TargetCostModel) -> List[OpDesc]
Apply a target cost model to logical ops.
For each op with a kernel-specific tag (< 128), looks up the cost model and fills in resource, latency, and role. Infrastructure ops (tag >= 128) are passed through unchanged — they carry their own annotations.
This is the bridge between the algorithm (which declares logical ops via OpDesc.logical()) and the scheduler (which needs resource/latency data).
Returns:
Was this page helpful?
Thank you! We'll create more content like this.
Thank you for helping us improve!