upleb.uk

Public git repos — served from a NIP-34 GRASP relay at git.upleb.uk

summaryrefslogtreecommitdiff
path: root/tools/wave64_emulate_opt.py
diff options
context:
space:
mode:
Diffstat (limited to 'tools/wave64_emulate_opt.py')
-rw-r--r--tools/wave64_emulate_opt.py12
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:]: