Recompiler tests: GPU checks for v_max3_u16, v_min3_u16 and v_med3_u16 #733

Open
13hourstilliland wants to merge 1 commit from upstream-pr/738 into main
13hourstilliland commented 2026-11-24 04:21:35 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by 13hourstilliland on 2026-11-24T04:21:35Z.


Adds a GPU test for three RDNA2 instructions that emit.rs translates but no test runs: v_max3_u16, v_min3_u16 and v_med3_u16. Test only, no runtime change.

What is in it

  • gpu_valu_16_bit_unsigned_min3_max3_med3 in crates/xcl/src/gpu/recomp/tests.rs, after gpu_grouped_loads_bounds_and_inactive_lanes (away from the lines open PRs add to): one kernel with all 3 instructions, run as wave64 where the adapter has it and as wave32 everywhere (gpu_waves), 32 rounds of operands per lane: u16 edges (0, 1, 2, 0x00F1, 0x7FFE, 0x7FFF, 0x8000, 0x8001, 0xFFFE, 0xFFFF) and random halves, always with non-zero bits in each source's high half, each lane compared with the RDNA2 definition computed on the CPU (sort the three low halves). Only the low 16 bits of the result are compared: the AMD machine-readable RDNA2 spec (VOP3 OP_SEL field) says op_sel[3] = 0 zeroes the high half, while LLVM's GCNSubtarget::zeroesHigh16BitsOfDest says gfx10 preserves it, so the high half is left unchecked.
  • A failure lists the lane, instruction, operands, result and expected value, and counts the wrong results per instruction.
  • Checked that it catches bugs, on a local copy, measured on 91f9a5e (the base of this branch): with the reference changed (reference with v_med3_u16 returning the minimum: wave32, 984 wrong (V_MED3_U16: 984), no other instruction) the test fails; with max3 with the inner op as min, min3 with the inner op as max, and med3 with the third operand replaced by the second applied to emit.rs all at once it fails and names every instruction (wave32, 1940 wrong (V_MAX3_U16: 659, V_MIN3_U16: 635, V_MED3_U16: 646), 635 to 659 wrong per instruction). Those edits are not in the PR.
  • The other 16-bit integer instructions are covered by #638 and #657, which are not touched here.

Tested

  • NVIDIA GeForce RTX 3070 8 GB, driver 610.88; Intel Core i5-12600K; Windows 11 Home build 26200
  • Rust 1.100.0 stable-x86_64-pc-windows-gnu (MinGW linker), DXC 1.9.2609.5, debug build, commit 3f812638b5 (on main 91f9a5e9f0)
  • cargo test --workspace --no-fail-fast -- --test-threads=4, run in the interactive desktop session: 693 passed, 0 failed, 41 ignored (lib: 653 passed, 0 failed, 21 ignored; e2e 3 of 3; gpu_valu_16_bit_unsigned_min3_max3_med3 ok). main 91f9a5e9f0 on the same machine: 692 passed, 0 failed, 41 ignored (lib: 652 passed, 0 failed, 21 ignored)
  • SKIPPED (no wave64 on this GPU): gpu_geometry_wave32_prefix_count_over_a_mask, gpu_wave32_program_in_wave64_hardware

Not tested

  • The wave64 path: the RTX 3070 has 32-lane waves only, so the test ran as wave32. Not run on AMD.
  • The MSVC toolchain (stable-x86_64-pc-windows-msvc): built with the GNU toolchain only.
  • A release build.
  • A retail title: not needed for a test-only change (no crates/xcl/src runtime file changes).

AI use

  • Hermes Agent with Claude Opus 5.5: wrote the test, ran the tests and the mutation check on the hardware above, and wrote this description.
<!-- greyfinch-sync:ivall/xcl:issue:5466027597 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/738). Originally posted by [13hourstilliland](https://github.com/13hourstilliland) on 2026-11-24T04:21:35Z. --- Adds a GPU test for three RDNA2 instructions that `emit.rs` translates but no test runs: `v_max3_u16`, `v_min3_u16` and `v_med3_u16`. Test only, no runtime change. **What is in it** - `gpu_valu_16_bit_unsigned_min3_max3_med3` in `crates/xcl/src/gpu/recomp/tests.rs`, after `gpu_grouped_loads_bounds_and_inactive_lanes` (away from the lines open PRs add to): one kernel with all 3 instructions, run as wave64 where the adapter has it and as wave32 everywhere (`gpu_waves`), 32 rounds of operands per lane: u16 edges (0, 1, 2, 0x00F1, 0x7FFE, 0x7FFF, 0x8000, 0x8001, 0xFFFE, 0xFFFF) and random halves, always with non-zero bits in each source's high half, each lane compared with the RDNA2 definition computed on the CPU (sort the three low halves). Only the low 16 bits of the result are compared: the AMD machine-readable RDNA2 spec (VOP3 `OP_SEL` field) says `op_sel[3] = 0` zeroes the high half, while LLVM's `GCNSubtarget::zeroesHigh16BitsOfDest` says gfx10 preserves it, so the high half is left unchecked. - A failure lists the lane, instruction, operands, result and expected value, and counts the wrong results per instruction. - Checked that it catches bugs, on a local copy, measured on 91f9a5e (the base of this branch): with the reference changed (reference with `v_med3_u16` returning the minimum: `wave32, 984 wrong (V_MED3_U16: 984)`, no other instruction) the test fails; with max3 with the inner op as min, min3 with the inner op as max, and med3 with the third operand replaced by the second applied to `emit.rs` all at once it fails and names every instruction (`wave32, 1940 wrong (V_MAX3_U16: 659, V_MIN3_U16: 635, V_MED3_U16: 646)`, 635 to 659 wrong per instruction). Those edits are not in the PR. - The other 16-bit integer instructions are covered by #638 and #657, which are not touched here. **Tested** - NVIDIA GeForce RTX 3070 8 GB, driver 610.88; Intel Core i5-12600K; Windows 11 Home build 26200 - Rust 1.100.0 `stable-x86_64-pc-windows-gnu` (MinGW linker), DXC 1.9.2609.5, debug build, commit 3f812638b558 (on main 91f9a5e9f031) - `cargo test --workspace --no-fail-fast -- --test-threads=4`, run in the interactive desktop session: 693 passed, 0 failed, 41 ignored (lib: 653 passed, 0 failed, 21 ignored; `e2e` 3 of 3; `gpu_valu_16_bit_unsigned_min3_max3_med3` ok). `main` 91f9a5e9f031 on the same machine: 692 passed, 0 failed, 41 ignored (lib: 652 passed, 0 failed, 21 ignored) - `SKIPPED` (no wave64 on this GPU): `gpu_geometry_wave32_prefix_count_over_a_mask`, `gpu_wave32_program_in_wave64_hardware` **Not tested** - The wave64 path: the RTX 3070 has 32-lane waves only, so the test ran as wave32. Not run on AMD. - The MSVC toolchain (`stable-x86_64-pc-windows-msvc`): built with the GNU toolchain only. - A release build. - A retail title: not needed for a test-only change (no `crates/xcl/src` runtime file changes). **AI use** - Hermes Agent with Claude Opus 5.5: wrote the test, ran the tests and the mutation check on the hardware above, and wrote this description.
MesshM commented 2026-11-24 07:06:18 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by MesshM on 2026-11-24T04:39:53Z.


Test run of 3f812638b55811d96d57047b6629d699828aab15 on AMD RDNA4. I merged it onto current main 64b3f35 locally (clean merge) and tested that tree.

Tested

  • AMD Radeon RX 9060 XT 16 GB (RDNA4, native wave64, mesh shaders), driver 32.0.32029.2010; Ryzen 7 5700X, 64 GB RAM, Windows 11 Pro build 26200, Rust 1.100.0 stable-x86_64-pc-windows-msvc, debug
  • cargo build --workspace + cargo test --workspace -- --test-threads=4 on the merge: 702 passed, 0 failed, 41 ignored, exit code 0; xcl lib tests 661 passed, 0 failed, 21 ignored
  • 0 SKIPPED; gpu_valu_16_bit_unsigned_min3_max3_med3 passes.

Review: med3 is the middle of the three sorted values and only D[15:0] is compared, as the ISA defines. Overlap: #638's description says #445 has the 16-bit min3 / max3 / med3; if #445 covers the unsigned forms too, one of the two is enough.

Not tested: no retail title or regression run (I have no unpacked game), no XCL_SAMPLE_* tests, release build; the PR's head on its old base was not run, only its merge onto main.

Run and review by Claude Code (Claude Opus 5.5) on this machine; the review points were checked against the code.

<!-- greyfinch-sync:ivall/xcl:comment:7122225505 --> Imported from [ivall/xcl](https://github.com/ivall/xcl/pull/738#issuecomment-7122225505). Originally posted by [MesshM](https://github.com/MesshM) on 2026-11-24T04:39:53Z. --- Test run of `3f812638b55811d96d57047b6629d699828aab15` on AMD RDNA4. I merged it onto current `main` `64b3f35` locally (clean merge) and tested that tree. **Tested** - AMD Radeon RX 9060 XT 16 GB (RDNA4, native wave64, mesh shaders), driver 32.0.32029.2010; Ryzen 7 5700X, 64 GB RAM, Windows 11 Pro build 26200, Rust 1.100.0 `stable-x86_64-pc-windows-msvc`, debug - `cargo build --workspace` + `cargo test --workspace -- --test-threads=4` on the merge: **702 passed, 0 failed, 41 ignored**, exit code 0; `xcl` lib tests 661 passed, 0 failed, 21 ignored - **0 `SKIPPED`**; `gpu_valu_16_bit_unsigned_min3_max3_med3` passes. **Review:** med3 is the middle of the three sorted values and only D[15:0] is compared, as the ISA defines. **Overlap:** #638's description says #445 has the 16-bit min3 / max3 / med3; if #445 covers the unsigned forms too, one of the two is enough. **Not tested:** no retail title or regression run (I have no unpacked game), no `XCL_SAMPLE_*` tests, release build; the PR's head on its old base was not run, only its merge onto `main`. Run and review by Claude Code (Claude Opus 5.5) on this machine; the review points were checked against the code.
futurepro62 commented 2026-11-24 07:06:20 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by futurepro62 on 2026-11-24T04:46:49Z.


An NVIDIA run, since the report above is on RDNA4 (native wave64). Tested exact head 3f81263 (on its base 91f9a5e).

Tested

  • NVIDIA GeForce RTX 5070 Ti 16 GB (Blackwell, 32-lane waves only, mesh shaders), driver 616.64, Ryzen 7 9800X3D, Windows 11 Home 26300, Rust 1.100.0 MSVC, debug, D3D12 debug layer installed.
  • cargo build --workspace, then XCL_REQUIRE_GPU=mesh cargo test --workspace -- --test-threads=4: 693 passed, 0 failed, 41 ignored. SKIPPED (no wave64): gpu_geometry_wave32_prefix_count_over_a_mask, gpu_wave32_program_in_wave64_hardware.
  • The new test ran and passed (not skipped): gpu::recomp::tests::gpu_valu_16_bit_unsigned_min3_max3_med3 ... ok.
    Not tested
  • AMD (covered above), a release build.

AI use

  • Claude Code (Claude Opus 5.5) ran the tests and wrote this report. I checked it before posting.
<!-- greyfinch-sync:ivall/xcl:comment:7122331685 --> Imported from [ivall/xcl](https://github.com/ivall/xcl/pull/738#issuecomment-7122331685). Originally posted by [futurepro62](https://github.com/futurepro62) on 2026-11-24T04:46:49Z. --- An NVIDIA run, since the report above is on RDNA4 (native wave64). Tested exact head `3f81263` (on its base `91f9a5e`). **Tested** - NVIDIA GeForce RTX 5070 Ti 16 GB (Blackwell, 32-lane waves only, mesh shaders), driver 616.64, Ryzen 7 9800X3D, Windows 11 Home 26300, Rust 1.100.0 MSVC, debug, D3D12 debug layer installed. - `cargo build --workspace`, then `XCL_REQUIRE_GPU=mesh cargo test --workspace -- --test-threads=4`: **693 passed, 0 failed, 41 ignored**. SKIPPED (no wave64): `gpu_geometry_wave32_prefix_count_over_a_mask`, `gpu_wave32_program_in_wave64_hardware`. - The new test ran and passed (not skipped): `gpu::recomp::tests::gpu_valu_16_bit_unsigned_min3_max3_med3 ... ok`. **Not tested** - AMD (covered above), a release build. **AI use** - Claude Code (Claude Opus 5.5) ran the tests and wrote this report. I checked it before posting.
ItsMrDubey commented 2026-11-24 07:06:25 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by ItsMrDubey on 2026-11-24T04:57:23Z.


Test report for 3f812638b55811d96d57047b6629d699828aab15 (this PR's head)

Tested

  • NVIDIA GeForce RTX 4070 Ti 12 GB (Ada), driver 617.14; Intel Core i9-10900K, 32 GB RAM; Windows 11 Pro build 26300
  • Rust 1.88.0 (stable-x86_64-pc-windows-msvc), debug; DXC 1.9.2602.17 from Windows SDK 10.0.26100
cargo build --workspace
cargo test --workspace --no-fail-fast -- --test-threads=4

16 test binaries: 692 passed, 1 failed, 41 ignored. Same machine, main 64b3f3559: 700 passed, 1 failed, 41 ignored.

This PR's tests:

  • gpu::recomp::tests::gpu_valu_16_bit_unsigned_min3_max3_med3: ok

Failures:

  • hle::kernelx::tests::xmem_virtual_query_marks_cpu_readable_memory fails on this machine on every run, on this PR's head and on main 64b3f3559 alike (5 of 5 reruns on main), so it is not from this PR. #650 fixes it here.

16 test binaries instead of main's 17 because this branch predates tests/sparse_reinit.rs; nothing crashed.

SKIPPED (no wave64 on this GPU): gpu_geometry_wave32_prefix_count_over_a_mask, gpu_wave32_program_in_wave64_hardware.

AI use: Claude Code (Claude Opus 5.5) ran the builds and tests and wrote this report from their output.

<!-- greyfinch-sync:ivall/xcl:comment:7122490446 --> Imported from [ivall/xcl](https://github.com/ivall/xcl/pull/738#issuecomment-7122490446). Originally posted by [ItsMrDubey](https://github.com/ItsMrDubey) on 2026-11-24T04:57:23Z. --- Test report for `3f812638b55811d96d57047b6629d699828aab15` (this PR's head) **Tested** - NVIDIA GeForce RTX 4070 Ti 12 GB (Ada), driver 617.14; Intel Core i9-10900K, 32 GB RAM; Windows 11 Pro build 26300 - Rust 1.88.0 (`stable-x86_64-pc-windows-msvc`), debug; DXC 1.9.2602.17 from Windows SDK 10.0.26100 ``` cargo build --workspace cargo test --workspace --no-fail-fast -- --test-threads=4 ``` 16 test binaries: **692 passed, 1 failed, 41 ignored**. Same machine, `main` `64b3f3559`: 700 passed, 1 failed, 41 ignored. This PR's tests: - `gpu::recomp::tests::gpu_valu_16_bit_unsigned_min3_max3_med3`: ok Failures: - `hle::kernelx::tests::xmem_virtual_query_marks_cpu_readable_memory` fails on this machine on every run, on this PR's head and on `main` `64b3f3559` alike (5 of 5 reruns on `main`), so it is not from this PR. #650 fixes it here. 16 test binaries instead of `main`'s 17 because this branch predates `tests/sparse_reinit.rs`; nothing crashed. SKIPPED (no wave64 on this GPU): `gpu_geometry_wave32_prefix_count_over_a_mask`, `gpu_wave32_program_in_wave64_hardware`. AI use: Claude Code (Claude Opus 5.5) ran the builds and tests and wrote this report from their output.
luckyteagirl commented 2026-11-24 07:06:42 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by luckyteagirl on 2026-11-24T05:59:36Z.


Native RDNA2 check of the untouched destination half

The PR description notes the ambiguity over the upper 16 bits. On the RX 6800M (gfx1031), native v_min3_u16, v_max3_u16 and v_med3_u16 all preserved the untouched destination half.

Tested

  • Windows 11 build 26200, Radeon RX 6800M, display driver 30.0.13002.13003, AMD OpenCL 3302.6 (PAL,LC).
  • The inline ISA kernel initialized each destination to 0xA55AC33C. It wrote the low half with default op_sel, and a separate instruction wrote the high half with op_sel:[0,0,0,1]. The three source low halves supplied the u16 operands. Their high halves were nonzero.
  • For all three instructions and 16 input triples, the written half matched a CPU-sorted reference. The untouched half retained 0xA55A for low writes and 0xC33C for high writes. Four work-items per case agreed.

For inputs 0x0000, 0xFFFF and 0x7FF8, the native median results were 0xA55A7FF8 for the default write and 0x7FF8C33C for the high-half write.

Not tested

The PR's translated GPU test and other GPU generations. This measures the three native RDNA2 instructions.

AI use

OpenAI Codex (GPT-6 family, exact model variant unavailable) wrote and ran the probe and drafted this report.

<!-- greyfinch-sync:ivall/xcl:comment:7123468126 --> Imported from [ivall/xcl](https://github.com/ivall/xcl/pull/738#issuecomment-7123468126). Originally posted by [luckyteagirl](https://github.com/luckyteagirl) on 2026-11-24T05:59:36Z. --- **Native RDNA2 check of the untouched destination half** The PR description notes the ambiguity over the upper 16 bits. On the RX 6800M (`gfx1031`), native `v_min3_u16`, `v_max3_u16` and `v_med3_u16` all preserved the untouched destination half. **Tested** - Windows 11 build 26200, Radeon RX 6800M, display driver `30.0.13002.13003`, AMD OpenCL `3302.6 (PAL,LC)`. - The inline ISA kernel initialized each destination to `0xA55AC33C`. It wrote the low half with default `op_sel`, and a separate instruction wrote the high half with `op_sel:[0,0,0,1]`. The three source low halves supplied the u16 operands. Their high halves were nonzero. - For all three instructions and 16 input triples, the written half matched a CPU-sorted reference. The untouched half retained `0xA55A` for low writes and `0xC33C` for high writes. Four work-items per case agreed. For inputs `0x0000`, `0xFFFF` and `0x7FF8`, the native median results were `0xA55A7FF8` for the default write and `0x7FF8C33C` for the high-half write. **Not tested** The PR's translated GPU test and other GPU generations. This measures the three native RDNA2 instructions. **AI use** OpenAI Codex (GPT-6 family, exact model variant unavailable) wrote and ran the probe and drafted this report.
JJAutoCompare commented 2026-11-25 06:06:07 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by JJAutoCompare on 2026-11-25T06:03:13Z.


Empirical test report (3f812638)

Verified PR #738 at 3f812638b55811d96d57047b6629d699828aab15.

Hardware / environment

  • Intel Arc A770 selected with XCL_ADAPTER=A770. Windows build 26200 on x64 (AuthenticAMD family 23, model 113).
  • rustc 1.100.0 (0ef1bc386 2026-11-09), Cargo unoptimized test profile with debug info and incremental compilation disabled.
  • dxc.exe --version reported DXC 1.9.2609.5 (01b62ad47). The fixture logged dxcompiler and dxil 1.9.2609.5 at runtime.

Commands and results

  • cargo test -p xcl --lib --no-run exited 0 outside the GPU lock.

  • Ran the emitted library test executable ($testExe) under Invoke-ArcTest.ps1 with XCL_ADAPTER=A770 and RUST_TEST_NOCAPTURE=1:

    & $testExe 'gpu::recomp::tests::gpu_valu_16_bit_unsigned_min3_max3_med3' --exact --nocapture --test-threads=1
    
  • Exit code 0. The captured libtest summary showed 1 passed, 0 failed, 0 ignored, with 673 filtered out and 0.73 s elapsed. The log contained 0 SKIPPED markers.

Observed behavior

The GPU fixture compared the low 16 bits from v_max3_u16, v_min3_u16, and v_med3_u16 against a Rust reference that sorts the three unsigned inputs. It completed 32 rounds per wave mode selected by the fixture with no mismatches. Inputs included boundary and pseudorandom values with nonzero upper halves. The passing fixture did not log the selected wave modes.

Not tested

The full GPU workspace suite and game smoke runs were omitted. This fixture checks only the low 16 bits of each destination.

AI use

Verified with T3 Code / Codex (gpt-6.2-sol, reasoningEffort: high). Coordinator #2 (T3 Code / Antigravity, gemini-4-neon) verified counts against pr738-focused.log and published.

<!-- greyfinch-sync:ivall/xcl:comment:7154392770 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/738#issuecomment-7154392770). Originally posted by [JJAutoCompare](https://github.com/JJAutoCompare) on 2026-11-25T06:03:13Z. --- ### Empirical test report (3f812638) Verified PR #738 at `3f812638b55811d96d57047b6629d699828aab15`. **Hardware / environment** - Intel Arc A770 selected with `XCL_ADAPTER=A770`. Windows build 26200 on x64 (AuthenticAMD family 23, model 113). - `rustc 1.100.0 (0ef1bc386 2026-11-09)`, Cargo unoptimized test profile with debug info and incremental compilation disabled. - `dxc.exe --version` reported DXC 1.9.2609.5 (01b62ad47). The fixture logged dxcompiler and dxil 1.9.2609.5 at runtime. **Commands and results** - `cargo test -p xcl --lib --no-run` exited 0 outside the GPU lock. - Ran the emitted library test executable (`$testExe`) under `Invoke-ArcTest.ps1` with `XCL_ADAPTER=A770` and `RUST_TEST_NOCAPTURE=1`: ```powershell & $testExe 'gpu::recomp::tests::gpu_valu_16_bit_unsigned_min3_max3_med3' --exact --nocapture --test-threads=1 ``` - Exit code 0. The captured libtest summary showed **1 passed, 0 failed, 0 ignored**, with 673 filtered out and 0.73 s elapsed. The log contained **0** `SKIPPED` markers. **Observed behavior** The GPU fixture compared the low 16 bits from `v_max3_u16`, `v_min3_u16`, and `v_med3_u16` against a Rust reference that sorts the three unsigned inputs. It completed 32 rounds per wave mode selected by the fixture with no mismatches. Inputs included boundary and pseudorandom values with nonzero upper halves. The passing fixture did not log the selected wave modes. **Not tested** The full GPU workspace suite and game smoke runs were omitted. This fixture checks only the low 16 bits of each destination. **AI use** Verified with T3 Code / Codex (gpt-6.2-sol, reasoningEffort: high). Coordinator #2 (T3 Code / Antigravity, gemini-4-neon) verified counts against `pr738-focused.log` and published.
DavidM1911 commented 2026-11-25 12:06:23 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by DavidM1911 on 2026-11-25T11:29:35Z.


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

  • cargo test -p xcl --lib: 1038 passed, 1 failed in one parallel run; the failing test passes on a single-threaded rerun (1039/0). Intermittent single-test flake / 0xc0000005 abort under parallel scheduling — tracked in #1978; clean on single-threaded rerun.

Thanks!

<!-- greyfinch-sync:ivall/xcl:comment:7161118033 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/738#issuecomment-7161118033). Originally posted by [DavidM1911](https://github.com/DavidM1911) on 2026-11-25T11:29:35Z. --- Verification on RTX 3060 Ti (Windows 11), branch merged with current `main`: - `cargo test -p xcl --lib`: 1038 passed, 1 failed in one parallel run; the failing test passes on a single-threaded rerun (1039/0). Intermittent single-test flake / 0xc0000005 abort under parallel scheduling — tracked in #1978; clean on single-threaded rerun. Thanks!
github-actions[bot] commented 2026-11-28 20:18:41 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by github-actions[bot] on 2026-11-28T20:18:41Z.


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.

<!-- greyfinch-sync:ivall/xcl:comment:7245192433 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/738#issuecomment-7245192433). Originally posted by [github-actions[bot]](https://github.com/apps/github-actions) on 2026-11-28T20:18:41Z. --- 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.
brainhay5 commented 2026-11-30 08:11:25 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by brainhay5 on 2026-11-30T08:11:25Z.


merge-check claim
head: 3f812638b5

<!-- greyfinch-sync:ivall/xcl:comment:7272592262 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/738#issuecomment-7272592262). Originally posted by [brainhay5](https://github.com/brainhay5) on 2026-11-30T08:11:25Z. --- merge-check claim head: 3f812638b55811d96d57047b6629d699828aab15
brainhay5 commented 2026-11-30 08:19:43 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by brainhay5 on 2026-11-30T08:19:43Z.


merge-check
base: d52ff48caa
head: 3f812638b5
merge: clean
build: cargo build --workspace -> ok
tests: cargo test --workspace --no-fail-fast -- --test-threads=4 -> 2876 passed, 2 failed, 51 ignored; 29 SKIPPED lines

failing: test_title_runs_and_game_folder_is_untouched
review: automated overnight check — diff inspected for safety only (no build/CI/toolchain/script changes, no process/network/runtime-loading code); no duplicate search performed; no line-by-line code review.
performance: not assessed beyond the suite.
verdict: safe to merge
hardware / tool and model: RTX 5070 Ti 16 GB, driver 610.88 (32.0.16.1088); Ryzen 7 5800X3D, 64 GB; Windows 11 22631; OpenCode agent, DeepSeek V4.1 Flash 1017

correction: this check first reported the PR as "not yet" because of a test failure that is not the PR's. The base-comparison step failed to run (test names contain a double colon, not a legal Windows filename), so an empty read was mistaken for "passes on base". gpu::dxil::msaa_tests::gpu_direct_image_get_resinfo_d16 fails on base d52ff48c by itself (verified separately with the same command: "assertion failed: 2D D16 resinfo clobbered v2/v3"). Verdict corrected. Apologies for the noise.

<!-- greyfinch-sync:ivall/xcl:comment:7272767698 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/738#issuecomment-7272767698). Originally posted by [brainhay5](https://github.com/brainhay5) on 2026-11-30T08:19:43Z. --- merge-check base: d52ff48caade1f5350d513bfffd370396dadfeb6 head: 3f812638b55811d96d57047b6629d699828aab15 merge: clean build: cargo build --workspace -> ok tests: cargo test --workspace --no-fail-fast -- --test-threads=4 -> 2876 passed, 2 failed, 51 ignored; 29 SKIPPED lines failing: test_title_runs_and_game_folder_is_untouched review: automated overnight check — diff inspected for safety only (no build/CI/toolchain/script changes, no process/network/runtime-loading code); no duplicate search performed; no line-by-line code review. performance: not assessed beyond the suite. verdict: safe to merge hardware / tool and model: RTX 5070 Ti 16 GB, driver 610.88 (32.0.16.1088); Ryzen 7 5800X3D, 64 GB; Windows 11 22631; OpenCode agent, DeepSeek V4.1 Flash 1017 correction: this check first reported the PR as "not yet" because of a test failure that is not the PR's. The base-comparison step failed to run (test names contain a double colon, not a legal Windows filename), so an empty read was mistaken for "passes on base". `gpu::dxil::msaa_tests::gpu_direct_image_get_resinfo_d16` fails on base d52ff48c by itself (verified separately with the same command: "assertion failed: 2D D16 resinfo clobbered v2/v3"). Verdict corrected. Apologies for the noise.
BBareth commented 2026-11-30 09:53:48 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by BBareth on 2026-11-30T09:53:48Z.


merge-check claim
head: 3f812638b5

<!-- greyfinch-sync:ivall/xcl:comment:7274832739 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/738#issuecomment-7274832739). Originally posted by [BBareth](https://github.com/BBareth) on 2026-11-30T09:53:48Z. --- merge-check claim head: 3f812638b55811d96d57047b6629d699828aab15
BBareth commented 2026-11-30 10:01:27 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by BBareth on 2026-11-30T10:01:27Z.


merge-check
base: 9dfbe3ea66
head: 3f812638b5
merge: clean
build: cargo build --workspace -> ok
tests: cargo test --workspace --no-fail-fast -- --test-threads=4 -> 2886 passed, 1 failed, 51 ignored; failing: gpu::dxil::msaa_tests::gpu_direct_image_get_resinfo_d16, which fails on the base alone too (base: 2885 passed, 1 failed, 51 ignored, 28 SKIPPED lines). 28 SKIPPED lines, as on the base. The new test gpu_valu_16_bit_unsigned_min3_max3_med3 passed; on this card it runs the wave32 form only (no wave64).
review: no blocking finding; test-only, one file, read in full. One GPU test of v_max3_u16, v_min3_u16 and v_med3_u16 against a CPU sort of the low halves, 32 dispatches of random operands mixed with edge values, with non-zero bits in every source's high half. Only the low 16 bits of the result are compared; the comment explains why (AMD's spec and LLVM disagree on the high half), which leaves the high half unpinned on purpose. Not a duplicate that I could find (#737 covers the f32 fma forms).
performance: none; tests only.
verdict: safe to merge
hardware / tool and model: RTX 5070 Ti 16 GB, driver 621.24 (32.0.16.2124); i7-12700K; Windows 11 26200. Claude Code, Claude Fable 5.2 read the diff, ran the build and the suite and wrote this check.

<!-- greyfinch-sync:ivall/xcl:comment:7275006902 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/738#issuecomment-7275006902). Originally posted by [BBareth](https://github.com/BBareth) on 2026-11-30T10:01:27Z. --- merge-check base: 9dfbe3ea6653a9c76ef3ea0d66187a4b5407483b head: 3f812638b55811d96d57047b6629d699828aab15 merge: clean build: cargo build --workspace -> ok tests: cargo test --workspace --no-fail-fast -- --test-threads=4 -> 2886 passed, 1 failed, 51 ignored; failing: gpu::dxil::msaa_tests::gpu_direct_image_get_resinfo_d16, which fails on the base alone too (base: 2885 passed, 1 failed, 51 ignored, 28 SKIPPED lines). 28 SKIPPED lines, as on the base. The new test `gpu_valu_16_bit_unsigned_min3_max3_med3` passed; on this card it runs the wave32 form only (no wave64). review: no blocking finding; test-only, one file, read in full. One GPU test of `v_max3_u16`, `v_min3_u16` and `v_med3_u16` against a CPU sort of the low halves, 32 dispatches of random operands mixed with edge values, with non-zero bits in every source's high half. Only the low 16 bits of the result are compared; the comment explains why (AMD's spec and LLVM disagree on the high half), which leaves the high half unpinned on purpose. Not a duplicate that I could find (#737 covers the f32 fma forms). performance: none; tests only. verdict: safe to merge hardware / tool and model: RTX 5070 Ti 16 GB, driver 621.24 (32.0.16.2124); i7-12700K; Windows 11 26200. Claude Code, Claude Fable 5.2 read the diff, ran the build and the suite and wrote this check.
Foniass commented 2026-12-01 04:02:34 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by Foniass on 2026-12-01T04:02:34Z.


Triage (#1607) – head 3f81263

Partial overlap: #1576 (opened later) also checks V_MIN3_U16 / V_MAX3_U16 / V_MED3_U16 on the GPU, inside a much larger test of bit ops, SAD and packed 16-bit ops. This PR is the narrower check, with garbage in the high halves of the sources and randomized edges. No test of these three instructions is on main.
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.

<!-- greyfinch-sync:ivall/xcl:comment:7300319148 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/738#issuecomment-7300319148). Originally posted by [Foniass](https://github.com/Foniass) on 2026-12-01T04:02:34Z. --- **Triage (#1607)** – head 3f81263 Partial overlap: #1576 (opened later) also checks V_MIN3_U16 / V_MAX3_U16 / V_MED3_U16 on the GPU, inside a much larger test of bit ops, SAD and packed 16-bit ops. This PR is the narrower check, with garbage in the high halves of the sources and randomized edges. No test of these three instructions is on main. 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.
stijn-boer commented 2026-12-02 18:44:46 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by stijn-boer on 2026-12-02T18:44:46Z.


merge-check
base: c53e969602
head: 3f812638b5
verdict: safe to merge

Windows / AMD RDNA4 — unsigned 16-bit VALU min/max/median checks on 3f81263

Clean merge onto main (merge commit 753768a287ec76bdff4e6bc18db145ae8b666cf1). git diff --check was clean.

Setup

AMD Radeon RX 9060 XT (32.0.32029.2010), Ryzen 7 5700X, Windows 10 21H2 build 19044.6332, Rust 1.100.0 debug, Agility 1.620.2, DXC 1.9.2609.5.

Tested

cargo test -p xcl --lib gpu_valu_16_bit_unsigned_min3_max3_med3 -- --test-threads=1 --show-output --nocapture — 1 passed, 0 failed, 0 ignored, 0 skip notices.

Diff review

The diff adds only the GPU test. It checks unsigned 16-bit min3, max3, and med3 against a CPU reference, with nonzero source high halves. The assertions cover the destination low half.

Not tested

The full workspace suite, retail smoke, or another GPU vendor in this run.

AI use

Codex (GPT-6) merged the PR, reviewed the test diff, ran the test, and drafted this report.

<!-- greyfinch-sync:ivall/xcl:comment:7355089967 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/738#issuecomment-7355089967). Originally posted by [stijn-boer](https://github.com/stijn-boer) on 2026-12-02T18:44:46Z. --- merge-check base: c53e96960265a82477a9c98677afb0402e98d486 head: 3f812638b55811d96d57047b6629d699828aab15 verdict: safe to merge **Windows / AMD RDNA4 — unsigned 16-bit VALU min/max/median checks on `3f81263`** Clean merge onto `main` (merge commit `753768a287ec76bdff4e6bc18db145ae8b666cf1`). `git diff --check` was clean. **Setup** AMD Radeon RX 9060 XT (32.0.32029.2010), Ryzen 7 5700X, Windows 10 21H2 build 19044.6332, Rust 1.100.0 debug, Agility 1.620.2, DXC 1.9.2609.5. **Tested** `cargo test -p xcl --lib gpu_valu_16_bit_unsigned_min3_max3_med3 -- --test-threads=1 --show-output --nocapture` — 1 passed, 0 failed, 0 ignored, 0 skip notices. **Diff review** The diff adds only the GPU test. It checks unsigned 16-bit min3, max3, and med3 against a CPU reference, with nonzero source high halves. The assertions cover the destination low half. **Not tested** The full workspace suite, retail smoke, or another GPU vendor in this run. **AI use** Codex (GPT-6) merged the PR, reviewed the test diff, ran the test, and drafted this report.
This pull request cannot be merged automatically due to conflicts.
Merge manually to resolve the conflicts.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin 'upstream-pr/738:upstream-pr/738'
git switch 'upstream-pr/738'

Merge

Merge the changes and update on Forgejo.

Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.

git switch 'main'
git merge --no-ff 'upstream-pr/738'
git switch 'upstream-pr/738'
git rebase 'main'
git switch 'main'
git merge --ff-only 'upstream-pr/738'
git switch 'upstream-pr/738'
git rebase 'main'
git switch 'main'
git merge --no-ff 'upstream-pr/738'
git switch 'main'
git merge --squash 'upstream-pr/738'
git switch 'main'
git merge --ff-only 'upstream-pr/738'
git switch 'main'
git merge 'upstream-pr/738'
git push origin 'main'
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
xcl-dev/xcl!733
No description provided.