xshader: select exact paired execution for split-EXEC wave64 row scans #493

Merged
MathiewMay merged 3 commits from upstream-pr/493 into main 2026-11-29 18:04:32 +00:00
MathiewMay commented 2026-11-29 16:16:31 +00:00 (Migrated from github.com)

Imported from brcly/TuxBox. Originally posted by MathiewMay on 2026-11-29T16:16:31Z.


Dependency

Stacked on PR #492, now including its 66a2977d high-watchdog review revision. The top commit adds only row-scan selection and its tests. Review/merge the prerequisite first.

Summary

Execute a proven wave64 row scan through the existing exact paired interpreter when the ordinary reduction recognizer refuses its shuffle sequence. An exclusive scan is not a whole-wave sum. Preserve every row shift, mask change, cross-row permute and lane read rather than replacing the algorithm.

Recognize adjacent constant EXEC_LO/EXEC_HI moves as a wave64 mask only when neither a narrow operation nor a branch entering the high-word move makes the width ambiguous. This split-EXEC proof is enabled for row scans, not the prerequisite's readlane fallback. Partial/unproved widths, unsupported control flow and unsafe group barriers remain refused.

The revised prerequisite retains 2^24 (16,777,216) watchdog ceilings on paired structured loops and dispatch, as requested in review. Nonzero-entry paired dispatch has its own counter; ordinary guards remain unchanged. This is a runaway safety ceiling, not a measured maximum guest workload. No scan-specific production code or fixtures changed during the rebase.

Tests

  • Original fresh fa1b9cf6 control: 1 regression fails / 1 negative control passes.
  • Revised combined prerequisite/scan focused tests: 9/9 passed; independent Python scan-reference tests: 3/3 passed.
  • Isolated python tuxbox.py check --no-gpu: all seven groups passed.
  • Full translator GPU suite: 65/65 groups passed.
  • Paired GPU group: 72 programs / 4,718,592 compared words / zero mismatches, including all six scan variants and the prerequisite's 15 automatic readlane variants, with the high watchdogs enabled.
  • Full homebrew/Lanes verification: 123/123 checks passed.
  • Provider regression controls: 22/22 passed.

Final results belong to 9a16ea04, directly on revised prerequisite 66a2977d, with upstream baseline fa1b9cf6. Unchanged native providers have separately recorded baseline provenance; compiler/helpers come from this exact immutable source. The complete chain is rerun after the watchdog rebase, not inferred from the original ce1fdfaf results. Original artifacts and public-head backup refs are preserved.

The paired GPU fixture includes six automatic-selection scan programs: 64/128/256-thread groups, with ordinary and console OP_SEL[3] encodings. Every returned word is checked against exclusive sums, including empty/full/sparse/one-half masks and 32-bit wraparound. An instruction interpreter is independently checked against that arithmetic oracle. Negative unit controls cover partial groups, a wave32 save-EXEC, an unpaired high-word write, a branch entering between the halves and an explicitly narrow profile. The prerequisite's >65,536-trip GPU case remains included; no deliberately endless GPU workload was launched.

The host-profile record adds split-exec-row-scan-two-waves with the same exact paired translation for all three profiles. Regeneration after rebase preserves the prerequisite's reviewed high-watchdog hashes; this top commit adds only the three scan records.

No new Lanes scenario: the exact DPP/EXEC encoding and exclusive per-lane result are exercised by the synthetic translator checker; existing Lanes suites provide integration coverage. No title shaders or captures are included.

python tuxbox.py check --no-gpu
python "$MEASURE/run_latest_translator.py" "$ARTIFACT" "$TRANSLATOR_WORK"
python "$MEASURE/run_latest_verify.py" "$ARTIFACT" "$VERIFY_WORK"
python "$MEASURE/run_latest_regressions.py" "$ARTIFACT" "$REGRESSION_WORK"

The wrappers pin immutable source/helpers/providers by SHA and run sequentially in an authenticated hidden/offline display with the stopped fixture prefix, without copies or a retail launch. No retail rendering/performance claim.

Local GPU/backend: AMD Radeon RX 9070 (1002:7550, RADV GFX1201), Mesa 26.2.7, GE-Proton11-14 on Linux.

Maintainer NVIDIA results cover the original uncapped #493 stack on main at 065a7f9a: RTX 4070 Ti SUPER (10de:2705), driver 620.x, GE-Proton11-14; 65/65 translator groups and 72 paired programs / 4,718,592 words / zero mismatches. NVIDIA confirmation of the revised watchdog stack remains outstanding before merge; no local NVIDIA run is claimed.

<!-- greyfinch-sync:brcly/TuxBox:issue:5552606474 --> Imported from [brcly/TuxBox](https://github.com/brcly/TuxBox/pull/493). Originally posted by [MathiewMay](https://github.com/MathiewMay) on 2026-11-29T16:16:31Z. --- ## Dependency Stacked on [PR #492](https://github.com/brcly/TuxBox/pull/492), now including its `66a2977d` high-watchdog review revision. **The top commit adds only row-scan selection and its tests.** Review/merge the prerequisite first. ## Summary Execute a proven wave64 row scan through the existing exact paired interpreter when the ordinary reduction recognizer refuses its shuffle sequence. An exclusive scan is not a whole-wave sum. Preserve every row shift, mask change, cross-row permute and lane read rather than replacing the algorithm. Recognize adjacent constant EXEC_LO/EXEC_HI moves as a wave64 mask only when neither a narrow operation nor a branch entering the high-word move makes the width ambiguous. This split-EXEC proof is enabled for row scans, not the prerequisite's readlane fallback. Partial/unproved widths, unsupported control flow and unsafe group barriers remain refused. The revised prerequisite retains **2^24 (16,777,216)** watchdog ceilings on paired structured loops and dispatch, as [requested in review](https://github.com/brcly/TuxBox/pull/492#issuecomment-7258860234). Nonzero-entry paired dispatch has its own counter; ordinary guards remain unchanged. This is a runaway safety ceiling, not a measured maximum guest workload. No scan-specific production code or fixtures changed during the rebase. ## Tests - Original fresh `fa1b9cf6` control: **1 regression fails / 1 negative control passes**. - Revised combined prerequisite/scan focused tests: **9/9 passed**; independent Python scan-reference tests: **3/3 passed**. - Isolated `python tuxbox.py check --no-gpu`: **all seven groups passed**. - Full translator GPU suite: **65/65 groups passed**. - Paired GPU group: **72 programs / 4,718,592 compared words / zero mismatches**, including all six scan variants and the prerequisite's 15 automatic readlane variants, with the high watchdogs enabled. - Full homebrew/Lanes verification: **123/123 checks passed**. - Provider regression controls: **22/22 passed**. Final results belong to `9a16ea04`, directly on revised prerequisite `66a2977d`, with upstream baseline `fa1b9cf6`. Unchanged native providers have separately recorded baseline provenance; compiler/helpers come from this exact immutable source. The complete chain is rerun after the watchdog rebase, not inferred from the original `ce1fdfaf` results. Original artifacts and public-head backup refs are preserved. The paired GPU fixture includes six automatic-selection scan programs: 64/128/256-thread groups, with ordinary and console OP_SEL[3] encodings. Every returned word is checked against exclusive sums, including empty/full/sparse/one-half masks and 32-bit wraparound. An instruction interpreter is independently checked against that arithmetic oracle. Negative unit controls cover partial groups, a wave32 save-EXEC, an unpaired high-word write, a branch entering between the halves and an explicitly narrow profile. The prerequisite's >65,536-trip GPU case remains included; no deliberately endless GPU workload was launched. The host-profile record adds `split-exec-row-scan-two-waves` with the same exact paired translation for all three profiles. Regeneration after rebase preserves the prerequisite's reviewed high-watchdog hashes; this top commit adds only the three scan records. No new Lanes scenario: the exact DPP/EXEC encoding and exclusive per-lane result are exercised by the synthetic translator checker; existing Lanes suites provide integration coverage. No title shaders or captures are included. ```sh python tuxbox.py check --no-gpu python "$MEASURE/run_latest_translator.py" "$ARTIFACT" "$TRANSLATOR_WORK" python "$MEASURE/run_latest_verify.py" "$ARTIFACT" "$VERIFY_WORK" python "$MEASURE/run_latest_regressions.py" "$ARTIFACT" "$REGRESSION_WORK" ``` The wrappers pin immutable source/helpers/providers by SHA and run sequentially in an authenticated hidden/offline display with the stopped fixture prefix, without copies or a retail launch. No retail rendering/performance claim. Local GPU/backend: AMD Radeon RX 9070 (1002:7550, RADV GFX1201), Mesa 26.2.7, GE-Proton11-14 on Linux. [Maintainer NVIDIA results](https://github.com/brcly/TuxBox/pull/492#issuecomment-7258969153) cover the **original uncapped #493 stack** on `main` at `065a7f9a`: RTX 4070 Ti SUPER (10de:2705), driver 620.x, GE-Proton11-14; 65/65 translator groups and 72 paired programs / 4,718,592 words / zero mismatches. **NVIDIA confirmation of the revised watchdog stack remains outstanding before merge; no local NVIDIA run is claimed.**
Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
brcly/TuxBox!493
No description provided.