diff options
| author | Jan Trencansky <jan.trencansky@protonmail.com> | 2026-11-26 16:55:04 -0500 |
|---|---|---|
| committer | Jan Trencansky <jan.trencansky@protonmail.com> | 2026-11-26 16:55:04 -0500 |
| commit | df92abca8ee2a8f9093efea7fcaa4dadc3ddaebc (patch) | |
| tree | 97ef8f95544fe263049d3f7360823f16100de209 /tools/wave64_emulate_opt.py | |
| parent | 49a0b69fcdb80db1f2a44ce7ca0ab8dfdec1e403 (diff) | |
| parent | e5a7c8942678b323f655939c81f5d8855d20c248 (diff) | |
Merge main e5a7c8942 into shadow-aliased-guard (#1867)
One conflict, runtime/README.md: this branch rewrote the LEONIDA_SHADOW_ALIAS_MS
row, main (#2163) added the LEONIDA_SHADOW_KEEP row after it. Both rows kept;
the keep row's "aliased" now reads "aliased while they can't be guarded at every
address", since aliased pages are no longer copied without a sign of a write.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Diffstat (limited to 'tools/wave64_emulate_opt.py')
| -rw-r--r-- | tools/wave64_emulate_opt.py | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/tools/wave64_emulate_opt.py b/tools/wave64_emulate_opt.py index 1ff464fd1..f8a50e0eb 100644 --- a/tools/wave64_emulate_opt.py +++ b/tools/wave64_emulate_opt.py | |||
| @@ -1741,13 +1741,6 @@ def plan_structured_emulation(blocks, raw_edges, succ, folds, fold_chain, absorb | |||
| 1741 | if any(sb_has_endpgm[u] for u in it_blocks): | 1741 | if any(sb_has_endpgm[u] for u in it_blocks): |
| 1742 | saw_endpgm = True | 1742 | saw_endpgm = True |
| 1743 | 1743 | ||
| 1744 | # Multi-wave soundness guard: any `s_barrier` inside a non-top-level guard/loop must stay in global x_scheduler | ||
| 1745 | # so waves on different paths can meet at different s_barrier sites (cs_barrier_divergent). | ||
| 1746 | for it in flat_top: | ||
| 1747 | if it[0] != "block": | ||
| 1748 | if any(sb_has_sbarrier[u] for u in _blocks_in_tree(it)): | ||
| 1749 | return None | ||
| 1750 | |||
| 1751 | def check_sync_free(it): | 1744 | def check_sync_free(it): |
| 1752 | sub_blocks = _blocks_in_tree(it) | 1745 | sub_blocks = _blocks_in_tree(it) |
| 1753 | has_loop = _tree_has_loop([it]) | 1746 | has_loop = _tree_has_loop([it]) |
| @@ -1793,7 +1786,10 @@ def plan_structured_emulation(blocks, raw_edges, succ, folds, fold_chain, absorb | |||
| 1793 | cur_dirty = sb_gen_dirty[b] if sb_clears_dirty[b] else (cur_dirty | sb_gen_dirty[b]) | 1786 | cur_dirty = sb_gen_dirty[b] if sb_clears_dirty[b] else (cur_dirty | sb_gen_dirty[b]) |
| 1794 | steps.append(("inline_block", b)) | 1787 | steps.append(("inline_block", b)) |
| 1795 | continue | 1788 | continue |
| 1796 | if has_end: | 1789 | # An `s_barrier` under a guard or in a loop: waves on different paths meet at different sites |
| 1790 | # (cs_barrier_divergent), which only the round scheduler models. Every wave enters the tail in the same | ||
| 1791 | # round, and what ran before it has no `s_barrier` that is not reached by the whole workgroup. | ||
| 1792 | if has_end or (it[0] != "block" and any(sb_has_sbarrier[u] for u in it_blocks)): | ||
| 1797 | # Early s_endpgm inside a wave-divergent guard/loop (or non-final block): hand remaining tail to x_scheduler. | 1793 | # Early s_endpgm inside a wave-divergent guard/loop (or non-final block): hand remaining tail to x_scheduler. |
| 1798 | rem = set() | 1794 | rem = set() |
| 1799 | for rem_it in flat_top[idx_it:]: | 1795 | for rem_it in flat_top[idx_it:]: |