[autotuner] Reduction fact layer: ReductionFact + AccumulatorFact + enriched MemoryOpFact#2761
Open
calebmkim wants to merge 1 commit into
Open
[autotuner] Reduction fact layer: ReductionFact + AccumulatorFact + enriched MemoryOpFact#2761calebmkim wants to merge 1 commit into
calebmkim wants to merge 1 commit into
Conversation
69cc426 to
f212074
Compare
5041cf6 to
124d450
Compare
This was referenced Jun 11, 2026
calebmkim
pushed a commit
that referenced
this pull request
Jun 11, 2026
…nriched MemoryOpFact Add the reduction fact layer the Triton reduction seed heuristic will read, built in the compiler fact pass. No heuristic yet — that lands in the next PR; these facts are populated but not consumed here. - helion/autotuner/config_spec.py: ReductionFact, AccumulatorFact, enriched MemoryOpFact (per-op provenance), and the fact storage fields on ConfigSpec. - helion/_compiler/device_ir.py: a 3-phase fact build (roll reductions, collect enriched memory-op facts after rolling, derive reduction/accumulator facts) that replaces bespoke per-config graph walks. - full_width_output / input_load_itemsize key on the reduction AXIS via a new MemoryOpFact.subscript_block_ids (block-id read from the index subscript, resolved reduction-agnostically) rather than an inner_extent==size_hint size-match — faithful for user-tiled (T2) reductions whose reduction block is reduction=False, and immune to a non-reduction dim coincidentally equal to the reduction extent. Byte-identical seed configs across the curriculum (no size coincidences existed). - test/test_memory_op_facts.py: fact coverage incl. the indexing-slot invariant. - test/test_barrier.py: update the rdim / config_spec fakes for the new fact build. stack-info: PR: #2761, branch: calebmkim/stack/2
124d450 to
0e1b911
Compare
calebmkim
commented
Jun 11, 2026
| 1 | ||
| for f in memory_op_facts | ||
| if f.kind == "load" and f.graph_id in load_graph_ids | ||
| ) |
Contributor
Author
There was a problem hiding this comment.
Key change: fill ReductionFact fields by reading MemoryOpFacts instead of manually walking graph.
0e1b911 to
2323360
Compare
2323360 to
c527a01
Compare
…nriched MemoryOpFact Add the reduction fact layer the Triton reduction seed heuristic will read, built in the compiler fact pass. No heuristic yet — that lands in the next PR; these facts are populated but not consumed here. - helion/autotuner/config_spec.py: ReductionFact, AccumulatorFact, enriched MemoryOpFact (per-op provenance), and the fact storage fields on ConfigSpec. - helion/_compiler/device_ir.py: a 3-phase fact build (roll reductions, collect enriched memory-op facts after rolling, derive reduction/accumulator facts) that replaces bespoke per-config graph walks. - full_width_output / input_load_itemsize key on the reduction AXIS via a new MemoryOpFact.subscript_block_ids (block-id read from the index subscript, resolved reduction-agnostically) rather than an inner_extent==size_hint size-match — faithful for user-tiled (T2) reductions whose reduction block is reduction=False, and immune to a non-reduction dim coincidentally equal to the reduction extent. Byte-identical seed configs across the curriculum (no size coincidences existed). - test/test_memory_op_facts.py: fact coverage incl. the indexing-slot invariant. - test/test_barrier.py: update the rdim / config_spec fakes for the new fact build. stack-info: PR: #2761, branch: calebmkim/stack/2
c527a01 to
4571ede
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Stacked PRs:
[autotuner] Reduction fact layer: ReductionFact + AccumulatorFact + enriched MemoryOpFact
Add the reduction fact layer the Triton reduction seed heuristic will read, built in
the compiler fact pass. No heuristic yet — that lands in the next PR; these facts are
populated but not consumed here.
MemoryOpFact (per-op provenance), and the fact storage fields on ConfigSpec.
enriched memory-op facts after rolling, derive reduction/accumulator facts) that
replaces bespoke per-config graph walks.
MemoryOpFact.subscript_block_ids (block-id read from the index subscript, resolved
reduction-agnostically) rather than an inner_extent==size_hint size-match — faithful
for user-tiled (T2) reductions whose reduction block is reduction=False, and immune to
a non-reduction dim coincidentally equal to the reduction extent. Byte-identical seed
configs across the curriculum (no size coincidences existed).