shader: exact static Wave32 LDS alias, lane-private, and commutative-atomic analysis #289

Closed
Vladimir-Human wants to merge 638 commits from upstream-pr/289 into main
Vladimir-Human commented 2026-11-27 13:44:38 +00:00 (Migrated from github.com)

Imported from TaynanGT/Vice-Tay. Originally posted by Vladimir-Human on 2026-11-27T13:44:38Z.


Summary

Replaces coarse per-region LDS read+write refusal inside divergent (!all) lane-branch regions with exact static Wave32 LDS hazard analysis in crates/victory-shader/src/emit/lds.rs, unlocking native WaveSize(32) lowering with zero approximation while preserving VICTORY_LDS_FLAGS, loose_lds, and opt-in VICTORY_LDS_WRITE_ONLY_OK=1 (32-lane hosts only).

What Changed

  1. Static Wave32 LDS Hazard Analyzer (crates/victory-shader/src/emit/lds.rs, lower.rs, mod.rs):
    • Refinement A (region_disjoint_ranges): Accepts acyclic !all regions whose accesses resolve to non-wrapping (MAX_OFFSET = 1 MiB) constant byte offsets on one shared group-uniform base (s < cs.user_sgprs() / GroupId, excluding scratch_wave_offset, uninitialized SGPRs, VOP3B carry/SCC, non-inline special constants, and Operand::Attr), with <4-byte enclosing-dword guards (ranges_may_overlap) and group-uniform stored data verified across every stored dword (is_uniform_ds_operand / is_uniform_val_at) so concurrent stores from both 32-lane halves are idempotent. Cyclic regions permit only disjoint reads and same-family commutative atomics.
    • Refinement B (region_lane_private): Proves injective per-thread private slots across all active (x, y, z) workgroup dimensions and paired v_mbcnt console lanes (group <= 64) with half-open [min_lo, max_hi) cross-cluster footprint disjointness (covering partial workgroup sizes n = 33..63), optionally combined with disjoint constant reads and disjoint constant non-returning commutative atomics.
    • Refinement C (region_commutative_atomics + ModCong): Accepts acyclic or cyclic !all regions of strictly non-returning (dst.is_none() && !name.contains("_rtn")) 32-bit integer commutative/associative atomics (ds_add_u32/ds_sub_u32, ds_or_b32, ds_and_b32, ds_xor_b32, ds_min_u32, ds_max_u32, ds_min_i32, ds_max_i32). Single-family regions allow arbitrary dynamic scatter addresses (e.g., histogram/bitmask loops); multi-family regions prove dword disjointness via wrap-safe modular congruence x == rem (mod 2^bits) (bits >= 3, e.g., dynamic tile * 8 + 0 vs tile * 8 + 4) or disjoint constant offsets on a shared uniform base. All _rtn returning atomics, ds_rsub_u32, ds_cmpst*, ds_wrxchg*, ds_min_f32/ds_max_f32, divergent s_barrier, and unknown DS ops remain refused unless proven lane-private.
    • Sound default write-only policy: Unproven pure write-only !all regions are refused by default (CyclicSharedWrite / WriteWriteOverlap); the legacy write-only / returning-atomic shortcut stays strictly opt-in behind VICTORY_LDS_WRITE_ONLY_OK=1 on 32-lane hosts only.
    • Two-tier cycle-safe DAG memoization: Memoizes eval_mod_val, eval_val, and is_uniform_val_at (mod_memo/val_memo/unif_memo for cycle-free nodes + per-query EvalState::local for cycle-hit nodes, checking dominance before lookup/insert) to keep deep shared/cyclic DAGs linear.
    • Shrinks lower.rs: Moves lds_flag_region into emit/lds.rs (lower.rs shrinks from 604.5 KiB to 577.9 KiB, well below the 640 KiB policy cap) and refines VICTORY_WAVE_WHY reasons via Refusal::reason().
  2. Cache Key & Translator Version (crates/victory-shader/src/lib.rs, crates/victory-gpu/src/shader_cache.rs):
    • Bumps TRANSLATOR_VERSION 9 -> 10 so cached Wave64 shaders affected by the exact analyzer re-translate cleanly.
    • Registers "VICTORY_LDS_WRITE_ONLY_OK" alongside "VICTORY_LDS_FLAGS" in shader_cache.rs.

Attribution

  • Base Refinement A / Refinement B static alias and lane-private framework adapted from the community LDS hazard analysis approach (vitutu1/victory-perf#12), incorporating @Dathinel's partial-workgroup byte-alias half-open footprint fix; extended here with Refinement C commutative-atomic + ModCong analysis, Refinement A uniform-data enforcement, default write-only soundness refusal, and cycle-safe DAG memoization.

Verification

Verified on Windows 11 (NVIDIA GeForce RTX 4070 SUPER, native D3D12 SM 6.6 Wave32 hardware, dxil.dll validation, VICTORY_D3D12_DEBUG=1, --test-threads=1, 0 D3D12 debug errors):

  • Policy & Hygiene: cargo run -p xtask -- policy (314 files ok), cargo test -p xtask (11/11), git diff --check clean, merge-tree clean against main.
  • Clippy: cargo clippy -p victory-shader --all-targets -- -D warnings (default & --all-features) and cargo clippy -p victory-gpu --lib -- -D warnings: 0 warnings.
  • Unit & Exhaustive Oracles (emit::lds, 24/24 in 0.38s):
    • exhaustive_byte_access_oracle_has_zero_false_accepts (48,212 cases, 0 false accepts)
    • exhaustive_mod_congruence_oracle_has_zero_false_disjoint_claims (35,721 cases, 0 false disjoint claims)
    • exhaustive_ranges_may_overlap_oracle_has_zero_false_disjoint_claims (72,000 cases, 0 false disjoint claims)
    • exhaustive_commutative_atomic_families_are_schedule_invariant (all 8 algebraic families across Wave64, hi-then-lo, reversed, and interleaved schedules)
    • Regression coverage for Refinement A uniform stored data (7 cases), default refusal of unproven write-only / cross-branch dynamic WAW / cyclic dynamic writes, and linear-time completion on 36-step doubling, 28-step tripling, and 36-step cyclic Phi DAGs.
  • Hardware D3D12 Wave32 Parity & Negative Controls (emit::wave64_tests, 32/32; lds_* 7/7 HW + 7/7 WARP):
    • 5 new Wave32 hardware compute parity tests (35 dispatches total on RTX 4070 SUPER, all asserting lowered.wave_size == Some(32) strictly without loose_lds/local_waves/widen + bit-exact Wave64 parity): Refinement A disjoint ranges, Refinement B lane-private + returning atomic loop, Refinement C1 dynamic ds_add_u32+ds_sub_u32 histogram loop, Refinement C3 multi-family dynamic stride-8 ds_max_u32+ds_min_u32, and mixed B+C private scratch + shared counter.
    • 2 negative controls: shared returning atomic stays Wave64; unresolved dynamic cross-branch WAW and uniform-address lane-varying store stay Wave64 by default (with VICTORY_LDS_WRITE_ONLY_OK=1 opt-in verified).
  • Full victory-shader & shader_cache: Full victory-shader HW suite (356 passed; 0 failed; 4 ignored), victory-gpu --lib shader_cache (4/4).
<!-- greyfinch-sync:TaynanGT/Vice-Tay:issue:5527664733 --> Imported from [TaynanGT/Vice-Tay](https://github.com/TaynanGT/Vice-Tay/pull/289). Originally posted by [Vladimir-Human](https://github.com/Vladimir-Human) on 2026-11-27T13:44:38Z. --- ## Summary Replaces coarse per-region LDS read+write refusal inside divergent (`!all`) lane-branch regions with exact static Wave32 LDS hazard analysis in `crates/victory-shader/src/emit/lds.rs`, unlocking native `WaveSize(32)` lowering with zero approximation while preserving `VICTORY_LDS_FLAGS`, `loose_lds`, and opt-in `VICTORY_LDS_WRITE_ONLY_OK=1` (32-lane hosts only). ### What Changed 1. **Static Wave32 LDS Hazard Analyzer (`crates/victory-shader/src/emit/lds.rs`, `lower.rs`, `mod.rs`):** - **Refinement A (`region_disjoint_ranges`):** Accepts acyclic `!all` regions whose accesses resolve to non-wrapping (`MAX_OFFSET = 1 MiB`) constant byte offsets on one shared group-uniform base (`s < cs.user_sgprs()` / `GroupId`, excluding `scratch_wave_offset`, uninitialized SGPRs, VOP3B carry/SCC, non-inline special constants, and `Operand::Attr`), with `<4`-byte enclosing-dword guards (`ranges_may_overlap`) and **group-uniform stored data** verified across every stored dword (`is_uniform_ds_operand` / `is_uniform_val_at`) so concurrent stores from both 32-lane halves are idempotent. Cyclic regions permit only disjoint reads and same-family commutative atomics. - **Refinement B (`region_lane_private`):** Proves injective per-thread private slots across all active `(x, y, z)` workgroup dimensions and paired `v_mbcnt` console lanes (`group <= 64`) with half-open `[min_lo, max_hi)` cross-cluster footprint disjointness (covering partial workgroup sizes `n = 33..63`), optionally combined with disjoint constant reads and disjoint constant non-returning commutative atomics. - **Refinement C (`region_commutative_atomics` + `ModCong`):** Accepts acyclic or cyclic `!all` regions of strictly non-returning (`dst.is_none() && !name.contains("_rtn")`) 32-bit integer commutative/associative atomics (`ds_add_u32`/`ds_sub_u32`, `ds_or_b32`, `ds_and_b32`, `ds_xor_b32`, `ds_min_u32`, `ds_max_u32`, `ds_min_i32`, `ds_max_i32`). Single-family regions allow arbitrary dynamic scatter addresses (e.g., histogram/bitmask loops); multi-family regions prove dword disjointness via wrap-safe modular congruence `x == rem (mod 2^bits)` (`bits >= 3`, e.g., dynamic `tile * 8 + 0` vs `tile * 8 + 4`) or disjoint constant offsets on a shared uniform base. All `_rtn` returning atomics, `ds_rsub_u32`, `ds_cmpst*`, `ds_wrxchg*`, `ds_min_f32`/`ds_max_f32`, divergent `s_barrier`, and unknown DS ops remain refused unless proven lane-private. - **Sound default write-only policy:** Unproven pure write-only `!all` regions are refused by default (`CyclicSharedWrite` / `WriteWriteOverlap`); the legacy write-only / returning-atomic shortcut stays strictly opt-in behind `VICTORY_LDS_WRITE_ONLY_OK=1` on 32-lane hosts only. - **Two-tier cycle-safe DAG memoization:** Memoizes `eval_mod_val`, `eval_val`, and `is_uniform_val_at` (`mod_memo`/`val_memo`/`unif_memo` for cycle-free nodes + per-query `EvalState::local` for cycle-hit nodes, checking dominance before lookup/insert) to keep deep shared/cyclic DAGs linear. - **Shrinks `lower.rs`:** Moves `lds_flag_region` into `emit/lds.rs` (`lower.rs` shrinks from `604.5 KiB` to `577.9 KiB`, well below the `640 KiB` policy cap) and refines `VICTORY_WAVE_WHY` reasons via `Refusal::reason()`. 2. **Cache Key & Translator Version (`crates/victory-shader/src/lib.rs`, `crates/victory-gpu/src/shader_cache.rs`):** - Bumps `TRANSLATOR_VERSION` `9 -> 10` so cached Wave64 shaders affected by the exact analyzer re-translate cleanly. - Registers `"VICTORY_LDS_WRITE_ONLY_OK"` alongside `"VICTORY_LDS_FLAGS"` in `shader_cache.rs`. ### Attribution - Base Refinement A / Refinement B static alias and lane-private framework adapted from the community LDS hazard analysis approach (`vitutu1/victory-perf#12`), incorporating `@Dathinel`'s partial-workgroup byte-alias half-open footprint fix; extended here with Refinement C commutative-atomic + `ModCong` analysis, Refinement A uniform-data enforcement, default write-only soundness refusal, and cycle-safe DAG memoization. ### Verification Verified on Windows 11 (`NVIDIA GeForce RTX 4070 SUPER`, native D3D12 SM 6.6 Wave32 hardware, `dxil.dll` validation, `VICTORY_D3D12_DEBUG=1`, `--test-threads=1`, `0` D3D12 debug errors): - **Policy & Hygiene:** `cargo run -p xtask -- policy` (`314 files ok`), `cargo test -p xtask` (**11/11**), `git diff --check` clean, `merge-tree` clean against `main`. - **Clippy:** `cargo clippy -p victory-shader --all-targets -- -D warnings` (default & `--all-features`) and `cargo clippy -p victory-gpu --lib -- -D warnings`: **0 warnings**. - **Unit & Exhaustive Oracles (`emit::lds`, 24/24 in `0.38s`):** - `exhaustive_byte_access_oracle_has_zero_false_accepts` (`48,212` cases, `0` false accepts) - `exhaustive_mod_congruence_oracle_has_zero_false_disjoint_claims` (`35,721` cases, `0` false disjoint claims) - `exhaustive_ranges_may_overlap_oracle_has_zero_false_disjoint_claims` (`72,000` cases, `0` false disjoint claims) - `exhaustive_commutative_atomic_families_are_schedule_invariant` (all 8 algebraic families across Wave64, hi-then-lo, reversed, and interleaved schedules) - Regression coverage for Refinement A uniform stored data (7 cases), default refusal of unproven write-only / cross-branch dynamic WAW / cyclic dynamic writes, and linear-time completion on 36-step doubling, 28-step tripling, and 36-step cyclic Phi DAGs. - **Hardware D3D12 Wave32 Parity & Negative Controls (`emit::wave64_tests`, 32/32; `lds_*` 7/7 HW + 7/7 WARP):** - 5 new Wave32 hardware compute parity tests (`35` dispatches total on RTX 4070 SUPER, all asserting `lowered.wave_size == Some(32)` strictly without `loose_lds`/`local_waves`/`widen` + bit-exact Wave64 parity): Refinement A disjoint ranges, Refinement B lane-private + returning atomic loop, Refinement C1 dynamic `ds_add_u32`+`ds_sub_u32` histogram loop, Refinement C3 multi-family dynamic stride-8 `ds_max_u32`+`ds_min_u32`, and mixed B+C private scratch + shared counter. - 2 negative controls: shared returning atomic stays Wave64; unresolved dynamic cross-branch WAW and uniform-address lane-varying store stay Wave64 by default (with `VICTORY_LDS_WRITE_ONLY_OK=1` opt-in verified). - **Full `victory-shader` & `shader_cache`:** Full `victory-shader` HW suite (**356 passed; 0 failed; 4 ignored**), `victory-gpu --lib shader_cache` (**4/4**).
TaynanGT commented 2026-11-27 13:48:24 +00:00 (Migrated from github.com)

Imported from TaynanGT/Vice-Tay. Originally posted by TaynanGT on 2026-11-27T13:48:24Z.


@Vladimir-Human The important correctness checks are partial workgroups, aliased dwords and atomics that return a value. Keep the negative cases next to the new accepted cases so the analyzer proves why each Wave32 lowering is safe. The hardware comparison should use complete readbacks on the same inputs.

<!-- greyfinch-sync:TaynanGT/Vice-Tay:comment:7219966977 --> Imported from [TaynanGT/Vice-Tay](https://github.com/TaynanGT/Vice-Tay/pull/289#issuecomment-7219966977). Originally posted by [TaynanGT](https://github.com/TaynanGT) on 2026-11-27T13:48:24Z. --- @Vladimir-Human The important correctness checks are partial workgroups, aliased dwords and atomics that return a value. Keep the negative cases next to the new accepted cases so the analyzer proves why each Wave32 lowering is safe. The hardware comparison should use complete readbacks on the same inputs.
Vladimir-Human commented 2026-11-27 13:52:21 +00:00 (Migrated from github.com)

Imported from TaynanGT/Vice-Tay. Originally posted by Vladimir-Human on 2026-11-27T13:52:21Z.


@TaynanGT CI is now green across Clippy, Default tests, Diagnostics tests, and check. Here are the paired accepted/negative checks and full-readback hardware tests on disk for each area:

  • Partial workgroups (n = 33..63):
    • crates/victory-shader/src/emit/lds.rs:4709 (partial_workgroup_byte_alias_is_refused) pairs the aliasing negative case ([0, n) byte write vs uniform read at n - 1 -> refused, Wave64) next to the disjoint accepted case (read at n -> Wave32) for n = 32, 33, 63, 64 (including end-to-end n = 33, 63 lowering).
    • lds.rs:4772 (exhaustive_byte_access_oracle_has_zero_false_accepts) sweeps 48,212 (n = 32..=65, stride, initial, r) combinations with 0 false accepts.
  • Aliased dwords (<4-byte enclosing-dword & range/stride overlap):
    • lds.rs:3599 (overlapping_constant_offsets_refuse_wave32), lds.rs:3610 (wide_b128_disjoint_and_overlap_checks), and lds.rs:3644 (uniform_base_shared_disjoint_and_mismatch_refused, including unaligned ds_write_b8 + ds_read_b32 enclosing-dword refusal) sit alongside lds.rs:3980 (exhaustive_ranges_may_overlap_oracle_has_zero_false_disjoint_claims, 72,000 checks).
    • lds.rs:3759 (commutative_non_returning_atomics_recover_exact_wave32) pairs accepted stride-8 ds_max_u32+ds_min_u32 directly next to colliding stride-4, cross-family, plain-write, and overlapping private+counter negative controls, backed by lds.rs:3894 (exhaustive_mod_congruence_oracle_has_zero_false_disjoint_claims, 35,721 cases).
    • lds.rs:4825 (refinement_a_requires_uniform_write_data) and lds.rs:4924 (unproven_write_only_regions_refused_by_default_and_gated_by_opt_in) pair lane-varying stores and unresolved cross-branch/cyclic write-only negative cases next to uniform-data positive controls.
  • Atomics that return a value (ds_*_rtn*):
    • lds.rs:3707 (returning_and_non_commutative_atomics_require_lane_privacy) pairs refused shared ds_add_rtn_u32, ds_cmpst_rtn_b32, ds_rsub_u32, ds_cmpst_b32, and ds_min_f32 (64) directly next to accepted lane-private ds_add_rtn_u32 at tid * 4 (32).
    • lds.rs:4539 (write_only_ok_flag_handles_returning_atomics_and_four_kernels) and crates/victory-shader/src/emit/wave64_tests.rs:1717 (lds_shared_returning_atomic_stays_wave64) verify shared returning atomics stay Wave64 by default (and remain Wave64 on mixed read+atomic or non-32-lane hosts even under opt-in VICTORY_LDS_WRITE_ONLY_OK=1).
  • Complete hardware readbacks on the same inputs (crates/victory-shader/src/emit/wave64_tests.rs):
    • The two negative controls (:1717 lds_shared_returning_atomic_stays_wave64, :1743 lds_unresolved_dynamic_waw_and_varying_store_stay_wave64) sit directly ahead of the 5 Wave32 hardware parity tests (:1877 lds_disjoint_constant_ranges_wave32_hw_parity — all 128 dwords; :1939 lds_lane_private_and_rtn_atomic_loop_wave32_hw_parity — all 128 dwords; :2015 lds_commutative_dynamic_histogram_wave32_hw_parity — all 8 bins; :2090 lds_commutative_multifamily_mod_stride_wave32_hw_parity — all 16 min/max dwords; :2161 lds_mixed_private_and_commutative_counter_wave32_hw_parity — all 65 private+counter dwords). Every dispatch checks the full readback buffer bit-for-bit against the exact Wave64 reference across the same boundary lane-count inputs (0, 1, 31, 32, 33, 63, 64 + loop counts; 35 dispatches total under VICTORY_D3D12_DEBUG=1).
<!-- greyfinch-sync:TaynanGT/Vice-Tay:comment:7220048239 --> Imported from [TaynanGT/Vice-Tay](https://github.com/TaynanGT/Vice-Tay/pull/289#issuecomment-7220048239). Originally posted by [Vladimir-Human](https://github.com/Vladimir-Human) on 2026-11-27T13:52:21Z. --- @TaynanGT CI is now green across Clippy, Default tests, Diagnostics tests, and `check`. Here are the paired accepted/negative checks and full-readback hardware tests on disk for each area: - **Partial workgroups (`n = 33..63`):** - `crates/victory-shader/src/emit/lds.rs:4709` (`partial_workgroup_byte_alias_is_refused`) pairs the aliasing negative case (`[0, n)` byte write vs uniform read at `n - 1` -> refused, Wave64) next to the disjoint accepted case (read at `n` -> Wave32) for `n = 32, 33, 63, 64` (including end-to-end `n = 33, 63` lowering). - `lds.rs:4772` (`exhaustive_byte_access_oracle_has_zero_false_accepts`) sweeps `48,212` `(n = 32..=65, stride, initial, r)` combinations with `0` false accepts. - **Aliased dwords (`<4`-byte enclosing-dword & range/stride overlap):** - `lds.rs:3599` (`overlapping_constant_offsets_refuse_wave32`), `lds.rs:3610` (`wide_b128_disjoint_and_overlap_checks`), and `lds.rs:3644` (`uniform_base_shared_disjoint_and_mismatch_refused`, including unaligned `ds_write_b8` + `ds_read_b32` enclosing-dword refusal) sit alongside `lds.rs:3980` (`exhaustive_ranges_may_overlap_oracle_has_zero_false_disjoint_claims`, `72,000` checks). - `lds.rs:3759` (`commutative_non_returning_atomics_recover_exact_wave32`) pairs accepted stride-8 `ds_max_u32`+`ds_min_u32` directly next to colliding stride-4, cross-family, plain-write, and overlapping private+counter negative controls, backed by `lds.rs:3894` (`exhaustive_mod_congruence_oracle_has_zero_false_disjoint_claims`, `35,721` cases). - `lds.rs:4825` (`refinement_a_requires_uniform_write_data`) and `lds.rs:4924` (`unproven_write_only_regions_refused_by_default_and_gated_by_opt_in`) pair lane-varying stores and unresolved cross-branch/cyclic write-only negative cases next to uniform-data positive controls. - **Atomics that return a value (`ds_*_rtn*`):** - `lds.rs:3707` (`returning_and_non_commutative_atomics_require_lane_privacy`) pairs refused shared `ds_add_rtn_u32`, `ds_cmpst_rtn_b32`, `ds_rsub_u32`, `ds_cmpst_b32`, and `ds_min_f32` (`64`) directly next to accepted lane-private `ds_add_rtn_u32` at `tid * 4` (`32`). - `lds.rs:4539` (`write_only_ok_flag_handles_returning_atomics_and_four_kernels`) and `crates/victory-shader/src/emit/wave64_tests.rs:1717` (`lds_shared_returning_atomic_stays_wave64`) verify shared returning atomics stay Wave64 by default (and remain Wave64 on mixed read+atomic or non-32-lane hosts even under opt-in `VICTORY_LDS_WRITE_ONLY_OK=1`). - **Complete hardware readbacks on the same inputs (`crates/victory-shader/src/emit/wave64_tests.rs`):** - The two negative controls (`:1717` `lds_shared_returning_atomic_stays_wave64`, `:1743` `lds_unresolved_dynamic_waw_and_varying_store_stay_wave64`) sit directly ahead of the 5 Wave32 hardware parity tests (`:1877` `lds_disjoint_constant_ranges_wave32_hw_parity` — all `128` dwords; `:1939` `lds_lane_private_and_rtn_atomic_loop_wave32_hw_parity` — all `128` dwords; `:2015` `lds_commutative_dynamic_histogram_wave32_hw_parity` — all `8` bins; `:2090` `lds_commutative_multifamily_mod_stride_wave32_hw_parity` — all `16` min/max dwords; `:2161` `lds_mixed_private_and_commutative_counter_wave32_hw_parity` — all `65` private+counter dwords). Every dispatch checks the full readback buffer bit-for-bit against the exact Wave64 reference across the same boundary lane-count inputs (`0, 1, 31, 32, 33, 63, 64` + loop counts; `35` dispatches total under `VICTORY_D3D12_DEBUG=1`).
TaynanGT commented 2026-11-27 14:11:13 +00:00 (Migrated from github.com)

Imported from TaynanGT/Vice-Tay. Originally posted by TaynanGT on 2026-11-27T14:11:13Z.


@Vladimir-Human The 33/63-lane checks and full readbacks on the returning-atomic cases cover the boundaries I wanted to see. Keep VICTORY_LDS_WRITE_ONLY_OK off for the first comparison and give 0bb3acd its own cache directory. #258 and #287 also declare translator version 10.

<!-- greyfinch-sync:TaynanGT/Vice-Tay:comment:7220458870 --> Imported from [TaynanGT/Vice-Tay](https://github.com/TaynanGT/Vice-Tay/pull/289#issuecomment-7220458870). Originally posted by [TaynanGT](https://github.com/TaynanGT) on 2026-11-27T14:11:13Z. --- @Vladimir-Human The 33/63-lane checks and full readbacks on the returning-atomic cases cover the boundaries I wanted to see. Keep `VICTORY_LDS_WRITE_ONLY_OK` off for the first comparison and give `0bb3acd` its own cache directory. #258 and #287 also declare translator version 10.
Aniseto commented 2026-11-27 18:01:45 +00:00 (Migrated from github.com)

Imported from TaynanGT/Vice-Tay. Originally posted by Aniseto on 2026-11-27T18:01:45Z.


Ran the new Wave32 LDS unit tests on an NVIDIA Blackwell part at 0bb3acd:

Environment: Windows 11 Pro build 26200 x64, NVIDIA GeForce RTX 5070 Ti (Blackwell, wave32 only, 16 GB) driver 32.0.16.2124, Intel Core i5-12400F, 64 GB RAM, rustc 1.100.0 (0ef1bc386 2026-11-09), MSVC 19.44.35230, DXC 1.9.2609.5, debug build.

cargo test -p victory-shader --lib emit::lds -- --test-threads=4
24 passed; 0 failed; 0 ignored      (exit 0)

The filter covers the analyzer's accepted and negative cases, including the exhaustive byte-access, ModCong and ranges-may-overlap oracles. The thread already has CI plus the owner's checks; this adds a Blackwell host on a newer driver and Windows build. These are CPU-side analyzer tests, so they do not by themselves show execution of the recovered Wave32 programs on hardware.

Not tested: hardware D3D12 execution of these programs, native wave64, AMD and Intel adapters, Wine, release profile, retail titles.

AI-assisted (OpenCode), model: DeepSeek V4.1 Flash Free - checked out the PR head in a detached worktree, ran the command above and wrote this report; no game data was used.

<!-- greyfinch-sync:TaynanGT/Vice-Tay:comment:7225041579 --> Imported from [TaynanGT/Vice-Tay](https://github.com/TaynanGT/Vice-Tay/pull/289#issuecomment-7225041579). Originally posted by [Aniseto](https://github.com/Aniseto) on 2026-11-27T18:01:45Z. --- Ran the new Wave32 LDS unit tests on an NVIDIA Blackwell part at 0bb3acd: Environment: Windows 11 Pro build 26200 x64, NVIDIA GeForce RTX 5070 Ti (Blackwell, wave32 only, 16 GB) driver 32.0.16.2124, Intel Core i5-12400F, 64 GB RAM, rustc 1.100.0 (0ef1bc386 2026-11-09), MSVC 19.44.35230, DXC 1.9.2609.5, debug build. ``` cargo test -p victory-shader --lib emit::lds -- --test-threads=4 24 passed; 0 failed; 0 ignored (exit 0) ``` The filter covers the analyzer's accepted and negative cases, including the exhaustive byte-access, ModCong and ranges-may-overlap oracles. The thread already has CI plus the owner's checks; this adds a Blackwell host on a newer driver and Windows build. These are CPU-side analyzer tests, so they do not by themselves show execution of the recovered Wave32 programs on hardware. Not tested: hardware D3D12 execution of these programs, native wave64, AMD and Intel adapters, Wine, release profile, retail titles. AI-assisted (OpenCode), model: **DeepSeek V4.1 Flash Free** - checked out the PR head in a detached worktree, ran the command above and wrote this report; no game data was used.
TaynanGT commented 2026-11-27 18:05:19 +00:00 (Migrated from github.com)

Imported from TaynanGT/Vice-Tay. Originally posted by TaynanGT on 2026-11-27T18:05:19Z.


@Aniseto All 24 CPU-side cases are accounted for at 0bb3acd, including the byte-range and ModCong oracles. That gives us an analyzer pass on Windows 11 26200. The complementary check is a complete D3D12 readback for the newly accepted cases, especially the ones involving returning atomics.

<!-- greyfinch-sync:TaynanGT/Vice-Tay:comment:7225110273 --> Imported from [TaynanGT/Vice-Tay](https://github.com/TaynanGT/Vice-Tay/pull/289#issuecomment-7225110273). Originally posted by [TaynanGT](https://github.com/TaynanGT) on 2026-11-27T18:05:19Z. --- @Aniseto All 24 CPU-side cases are accounted for at `0bb3acd`, including the byte-range and ModCong oracles. That gives us an analyzer pass on Windows 11 26200. The complementary check is a complete D3D12 readback for the newly accepted cases, especially the ones involving returning atomics.
Aniseto commented 2026-11-28 14:28:26 +00:00 (Migrated from github.com)

Imported from TaynanGT/Vice-Tay. Originally posted by Aniseto on 2026-11-28T14:28:26Z.


Re-ran the Wave32 LDS analyzer tests at 4ec4b55 after the head moved from 0bb3acd; this is a new response in the same thread, not an edit of my earlier report:

Environment: Windows 11 Pro build 26200 x64, NVIDIA GeForce RTX 5070 Ti (Blackwell, wave32 only, 16 GB) driver 32.0.16.2124, Intel Core i5-12400F, 64 GB RAM, rustc 1.100.0 (0ef1bc386 2026-11-09), MSVC 19.44.35230, DXC 1.9.2609.5, debug build.

cargo test -p victory-shader --lib emit::lds -- --test-threads=4
24 passed; 0 failed; 0 ignored; 0 measured; 368 filtered out      (exit 0)

All 24 CPU-side analyzer cases still pass at the new head, with the same count as at 0bb3acd. They cover the accepted disjoint-range, lane-private and commutative-atomic regions and the negative controls, including the byte-access, ranges-may-overlap and ModCong oracles. These are analyzer tests, not hardware execution of the recovered Wave32 programs.

Not tested: hardware D3D12 execution of these programs, a paired smoke run, a retail title, native wave64, AMD and Intel adapters, Wine, release profile, game data.

AI-assisted (OpenCode), model: DeepSeek V4.1 Flash Free - checked out the new PR head in a detached worktree, built it, ran the command above and wrote this report; no game data was used.

<!-- greyfinch-sync:TaynanGT/Vice-Tay:comment:7240696523 --> Imported from [TaynanGT/Vice-Tay](https://github.com/TaynanGT/Vice-Tay/pull/289#issuecomment-7240696523). Originally posted by [Aniseto](https://github.com/Aniseto) on 2026-11-28T14:28:26Z. --- Re-ran the Wave32 LDS analyzer tests at `4ec4b55` after the head moved from `0bb3acd`; this is a new response in the same thread, not an edit of my earlier report: Environment: Windows 11 Pro build 26200 x64, NVIDIA GeForce RTX 5070 Ti (Blackwell, wave32 only, 16 GB) driver 32.0.16.2124, Intel Core i5-12400F, 64 GB RAM, rustc 1.100.0 (0ef1bc386 2026-11-09), MSVC 19.44.35230, DXC 1.9.2609.5, debug build. ``` cargo test -p victory-shader --lib emit::lds -- --test-threads=4 24 passed; 0 failed; 0 ignored; 0 measured; 368 filtered out (exit 0) ``` All 24 CPU-side analyzer cases still pass at the new head, with the same count as at `0bb3acd`. They cover the accepted disjoint-range, lane-private and commutative-atomic regions and the negative controls, including the byte-access, ranges-may-overlap and ModCong oracles. These are analyzer tests, not hardware execution of the recovered Wave32 programs. Not tested: hardware D3D12 execution of these programs, a paired smoke run, a retail title, native wave64, AMD and Intel adapters, Wine, release profile, game data. AI-assisted (OpenCode), model: **DeepSeek V4.1 Flash Free** - checked out the new PR head in a detached worktree, built it, ran the command above and wrote this report; no game data was used.
TaynanGT commented 2026-11-29 11:23:49 +00:00 (Migrated from github.com)

Imported from TaynanGT/Vice-Tay. Originally posted by TaynanGT on 2026-11-29T11:23:49Z.


Thanks for rerunning on 4ec4b55 and documenting the negative controls. The 24 passing analyzer tests are useful CPU-side coverage. Hardware execution of recovered Wave32 programs is still the next important validation step.

<!-- greyfinch-sync:TaynanGT/Vice-Tay:comment:7255083152 --> Imported from [TaynanGT/Vice-Tay](https://github.com/TaynanGT/Vice-Tay/pull/289#issuecomment-7255083152). Originally posted by [TaynanGT](https://github.com/TaynanGT) on 2026-11-29T11:23:49Z. --- Thanks for rerunning on 4ec4b55 and documenting the negative controls. The 24 passing analyzer tests are useful CPU-side coverage. Hardware execution of recovered Wave32 programs is still the next important validation step.
TaynanGT commented 2026-11-30 17:12:52 +00:00 (Migrated from github.com)

Imported from TaynanGT/Vice-Tay. Originally posted by TaynanGT on 2026-11-30T17:12:52Z.


main has moved to a new line of the code and everything is now named Vice-Tay, so this PR no longer applies as it is (details in #468). If you'd like this change in, please rebuild it on the current main and open a new PR; I'll review it there.

<!-- greyfinch-sync:TaynanGT/Vice-Tay:comment:7285900056 --> Imported from [TaynanGT/Vice-Tay](https://github.com/TaynanGT/Vice-Tay/pull/289#issuecomment-7285900056). Originally posted by [TaynanGT](https://github.com/TaynanGT) on 2026-11-30T17:12:52Z. --- `main` has moved to a new line of the code and everything is now named Vice-Tay, so this PR no longer applies as it is (details in #468). If you'd like this change in, please rebuild it on the current `main` and open a new PR; I'll review it there.

Pull request closed

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
TaynanGT/Vice-Tay!289
No description provided.