Function sequant::eval::compute_sliced_mode_assignment¶
Defined in File ordered_schedule.hpp
Function Documentation¶
-
inline SlicedModeAssignment sequant::eval::compute_sliced_mode_assignment(OrderedSchedule const &ordered, RichSchedule const &rich)¶
build the per-(value, sliced-mode) -> DAG-scope-loop
SlicedModeAssignmentfrom an already-builtordered(must bebuild_ordered_schedule(rich, ...)'sreturn value for this samerich).Uses a two-pass fetch-site walk (
populate_build_scope_walkfor the enclosing-loop scope of every produced/escaped value, andordered_schedule_dep_graphfor the operand edges, leaves included): an exact pass matching a block’s representative axis against a value’s own carriedIndex(step (3) below), then a regime-2 relabel pass (step (4) below) recovering a CSE value’s own label from its occurrences when it was canonicalized independently of the block’s representative axis (the same physical loop, relabeled) — but records the raw facts keyed by the value’s ownIndexlabel (not aValueCell::carriedposition), consistency-checked the same way (two fetch sites disagreeing on one value’s mode’s level is a scheduler bug, never resolved by averaging or last-write-wins), then remapped through the canonicalLoopIdenumeration (detail::enumerate_realized_levels) instead of storing theDagScopeLeveldirectly — this is what makes forced-split siblings (same depth/space, different ordinal) come out as distinct colors: they are distinct entries in the canonicallevelslist by construction.