mirror of
https://github.com/ubiquitarianism/leonida.git
synced 2026-11-26 22:40:52 +01:00
[PR #2171] translator: active runs under --wave64-emulate too (TRANSLATOR-W64-EMULATE-ACTIVE-RUNS) #2174
Labels
No labels
bug
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
starred/leonida#2174
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/ubiquitarianism/leonida/pull/2171
Author: @kawaii-shakal
Created: 11/26/2026
Status: 🔄 Open
Base:
main← Head:translator-w64-emulate-active-runs📝 Commits (3)
1c5b64dtranslator: active runs under --wave64-emulate too (TRANSLATOR-W64-EMULATE-ACTIVE-RUNS)033b1c9translator: say active runs hold under --wave64-emulate in design.md; name the run check an internal invariant3a0a26bMerge remote-tracking branch 'upstream/main' into translator-w64-emulate-active-runs📊 Changes
3 files changed (+91 additions, -5 deletions)
View changed files
📝
docs/design.md(+1 -1)📝
tests/semantic/test_active_runs.py(+80 -1)📝
tools/rdna2spirv.py(+10 -3)📄 Description
Claimed in the coordination issue as TRANSLATOR-W64-EMULATE-ACTIVE-RUNS: https://github.com/ubiquitarianism/leonida/issues/1608#issuecomment-7179737707
Problem
184d78905puts a run of lane-local VALU instructions under oneif (active)instead of anOpSelectper VGPR write, but only outside--wave64-emulate. The comment gave the reason as emulated rounds splitting blocks at instruction boundaries. They don't: a round ends a segment only atx_split, which the translator calls for a cross-lane exchange, a barrier or a memory-ordering point. A lane-local instruction is none of these, so a run always sits inside one segment.Change
Gen.insnsno longer excludesself.emulatefrom runs.x_marksdid not grow. Anx_splitinside a run raises anAssertionErrorinstead of cutting theifin two, the same way a wrongly lane-local instruction already stops the translation.On the new test's shader the module goes from 49 to 40
OpSelects.Tested
tests/semantic/test_active_runs.pygetsEmulatedWave64ActiveRuns, an emulated compute if/else over EXEC with runs on both sides and a cross-halfbuffer_load(an exchange round) between them. At 64 and 128 threads, in both scheduling orders, it checks withrun_emulated_workgroupthat the module has its runs and stores the values worked out lane by lane, the same as the per-write translation (MIN_ACTIVE_RUNout of reach). It fails on main ("0 not greater than or equal to 3").python -I scripts/run_semantic_tests.py tests/semanticpasses, 495 files and 6,334 tests.--wave64-emulatepass:test_mesh_compute,test_translateandtest_wave64_halves_fixturesunder pytest, plus the standalone ones.🤖 Generated with Claude Code
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.