Skip to content

Tests: cover V_BFE_U32 width and offset bounds on the GPU - #1626

Open
pane33 wants to merge 1 commit into
xcl-dev:mainfrom
pane33:tests/gpu-unsigned-bfe-bounds
Open

pane33 wants to merge 1 commit into
xcl-dev:mainfrom
pane33:tests/gpu-unsigned-bfe-bounds

Conversation

@pane33

@pane33 pane33 commented Nov 24, 2026

Copy link
Copy Markdown
Contributor

Add GPU coverage for the width and offset bounds of V_BFE_U32. The test checks zero width, the maximum effective width, masking of both operands, and extraction across the end of the source word.

What is in it

  • Add gpu_unsigned_bfe_width_and_offset_bounds to crates/xcl/src/gpu/recomp/tests.rs.

Tested

  • Windows 11 Pro build 26300, AMD Ryzen 5 7600X, NVIDIA GeForce RTX 4060, driver 32.0.16.2124, Rust and Cargo 1.100.0 (x86_64-pc-windows-msvc), DXC 1.9.2602.17, debug profile. Tested base 9e3831e1f570d3646e53ab753b19ec07eb8f1485 with the proposed diff applied.
  • cargo test -p xcl --lib gpu_unsigned_bfe_width_and_offset_bounds -- --nocapture — 1 passed, 0 failed, 0 ignored, 0 GPU skips, 748 filtered out. All 32 wave32 lanes matched their expected results, covering all five cases.
  • powershell.exe -NoProfile -ExecutionPolicy Bypass -File .\scripts\test.ps1 with RUST_TEST_NOCAPTURE=1 — 777 passed as reported by Cargo, 0 failed, 41 ignored, 0 filtered out. The pass count includes the three GPU skips below.
  • GPU skips — gpu_geometry_wave32_prefix_count_over_a_mask and gpu_wave32_program_in_wave64_hardware (no wave64), and heap_window_out_of_memory_falls_back_to_the_switch_form (no heap windows).
  • git diff --check — passed.

Regression run

  • The diff is confined to tests.rs. The runtime smoke requirement does not apply.

Not tested

  • AMD adapters, native wave64, and retail-title smoke. Sample-dependent paths had no coverage because the XCL_SAMPLE_* variables were unset.

AI use

  • Codex (GPT-6.2-Sol) checked upstream for overlap, implemented the test, ran the local checks, and drafted this description.

Exercise zero and maximum effective widths, operand masking, and
extraction across the end of the source word.

Assisted-by: Codex (GPT-6.2-Sol)
@Belox17

Belox17 commented Nov 24, 2026

Copy link
Copy Markdown

Test report for d6f33d6f on NVIDIA (RTX 3060 Ti): the new GPU test passes and nothing else changes

Tested

  • NVIDIA GeForce RTX 3060 Ti 8 GB (32-lane waves), driver 32.0.16.2124; Ryzen 5 5600X; Windows 11 build 26300; rustc 1.98.1 MSVC; DXC 1.8.2502.11 (Windows SDK 10.0.26100); debug build. Head d6f33d6f as is (base 9e3831e), clean tree.
  • The new test (gpu_unsigned_bfe_width_and_offset_bounds) with cargo test -p xcl --lib <name>: 1 passed (the GPU part ran on this adapter, no SKIPPED).
  • cargo test --workspace -- --test-threads=4 on the head: 777 passed, 0 failed, 41 ignored; its base 9e3831e on the same machine: 776 passed, 0 failed, 41 ignored. SKIPPED on both: gpu_geometry_wave32_prefix_count_over_a_mask, gpu_wave32_program_in_wave64_hardware (no wave64), heap_window_out_of_memory_falls_back_to_the_switch_form (no heap windows).
  • Merged into current main c160d86e (clean merge): 859 passed, 0 failed, 42 ignored; main alone: 858 passed, 0 failed, 42 ignored, the same three SKIPPED as above.

Not tested

  • AMD / native wave64 hardware; any retail title (no smoke run).

AI use: Claude Code (Claude Opus 5.5) ran the commands on this machine and wrote this report from those runs.

@DavidM1911

Copy link
Copy Markdown
Contributor

Verification on RTX 3060 Ti (Windows 11), branch merged with current main:

  • cargo test -p xcl --lib: all passed, 0 failed, ~22 ignored. (Intermittent single-test flake under parallel scheduling; clean on single-threaded rerun — same flake seen on unmodified main.)

Thanks!

@github-actions

Copy link
Copy Markdown

Nothing has happened on this PR for 3 days, so it is marked stale and will be closed in 4 days. A push or a comment takes the mark off: rebase it onto main if it conflicts, and say in one line what it still fixes. If it only waits for a maintainer, a comment saying so is enough.

@github-actions github-actions Bot added the stale No activity for 3 days; closed 4 days later unless something happens label Nov 28, 2026
@Foniass

Foniass commented Dec 1, 2026

Copy link
Copy Markdown
Contributor

Triage (#1607) – head d6f33d6

No merged test covers these v_bfe_u32 cases: main has only gpu_signed_bfe_arithmetic_shift and BFEs with constant fields. #2171 (opened later, a DXIL lowering change) adds gpu_v_bfe_edge_cases, a superset of these cases for u32 and i32. Keep only one of the two if #2171 lands.
The expected values match (S0 >> (S1 & 31)) & ((1 << (S2 & 31)) - 1). No problems found in the diff.
Recommendation: keep open.

AI review: Claude Code (Claude Opus 5.5), diffs read only, not built or run; not checked by a human.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

off-goal Does not bear on the current goal (world loading); waits until it is reached stale No activity for 3 days; closed 4 days later unless something happens

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants