Tests: check v_dot2_i32_i16/u32_u16 and v_dot8_i32_i4/u32_u4 on the GPU #1481

Closed
mynzjerko wants to merge 1 commit from upstream-pr/1491 into main
mynzjerko commented 2026-11-24 16:52:33 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by mynzjerko on 2026-11-24T16:52:33Z.


Add GPU test coverage for v_dot2_i32_i16, v_dot2_u32_u16, v_dot8_i32_i4, and v_dot8_u32_u4 (ENC_VOP3P) against pure-Rust references in both wave64 and wave32.

What is in it

  • crates/xcl/src/gpu/recomp/tests.rs: add gpu_dot2_i16_u16_and_dot8_i4_u4 covering unclamped 32-bit wraparound (including product-only overflow with zero accumulator), CLAMP=1 positive/negative saturation (i32::MIN, i32::MAX, u32::MAX), OP_SEL / OP_SEL_HI half swap and broadcast on v_dot2_*, signed/unsigned 4-bit nibble boundaries across all 8 nibble positions on v_dot8_*, and SGPR SRC0 / SRC2 operands.

Tested

  • AMD Radeon RX 9070 (RDNA4, native wave64, driver 32.0.32029.2010), AMD Ryzen 5 7500F, Windows 11 Pro 10.0.26300, rustc 1.100.0 (stable-x86_64-pc-windows-msvc), DXC 1.9.2602.17, debug build
  • cargo test -p xcl --lib -- gpu_dot2_i16_u16_and_dot8_i4_u4 --nocapture --test-threads=1: 1 passed, 0 failed, 0 ignored (0 SKIPPED)
  • cargo test --workspace -- --test-threads=4: 771 passed, 0 failed, 41 ignored (xcl --lib: 723 passed, 0 failed, 21 ignored; SKIPPED GPU tests: 0)

Not tested

  • NVIDIA / Intel GPUs, Linux / Wine, release build, retail titles (scripts/smoke.ps1; tests-only change)

AI use

  • Google Antigravity (Gemini 4 Neon) wrote the test, ran the builds and test suite locally, and drafted this description.
<!-- greyfinch-sync:ivall/xcl:issue:6586959062 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1491). Originally posted by [mynzjerko](https://github.com/mynzjerko) on 2026-11-24T16:52:33Z. --- Add GPU test coverage for `v_dot2_i32_i16`, `v_dot2_u32_u16`, `v_dot8_i32_i4`, and `v_dot8_u32_u4` (`ENC_VOP3P`) against pure-Rust references in both `wave64` and `wave32`. **What is in it** - `crates/xcl/src/gpu/recomp/tests.rs`: add `gpu_dot2_i16_u16_and_dot8_i4_u4` covering unclamped 32-bit wraparound (including product-only overflow with zero accumulator), `CLAMP=1` positive/negative saturation (`i32::MIN`, `i32::MAX`, `u32::MAX`), `OP_SEL` / `OP_SEL_HI` half swap and broadcast on `v_dot2_*`, signed/unsigned 4-bit nibble boundaries across all 8 nibble positions on `v_dot8_*`, and SGPR `SRC0` / `SRC2` operands. **Tested** - AMD Radeon RX 9070 (RDNA4, native wave64, driver `32.0.32029.2010`), AMD Ryzen 5 7500F, Windows 11 Pro 10.0.26300, `rustc 1.100.0` (`stable-x86_64-pc-windows-msvc`), DXC `1.9.2602.17`, debug build - `cargo test -p xcl --lib -- gpu_dot2_i16_u16_and_dot8_i4_u4 --nocapture --test-threads=1`: 1 passed, 0 failed, 0 ignored (`0 SKIPPED`) - `cargo test --workspace -- --test-threads=4`: 771 passed, 0 failed, 41 ignored (`xcl --lib`: 723 passed, 0 failed, 21 ignored; `SKIPPED` GPU tests: 0) **Not tested** - NVIDIA / Intel GPUs, Linux / Wine, release build, retail titles (`scripts/smoke.ps1`; tests-only change) **AI use** - Google Antigravity (Gemini 4 Neon) wrote the test, ran the builds and test suite locally, and drafted this description.
nnonno91 commented 2026-11-24 17:06:43 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by nnonno91 on 2026-11-24T16:58:10Z.


Independent GPU test of cd4b097f58e3580656f4140241d5a483750558c0.

Tested

  • Windows 11 25H2 (26200.9974), Ryzen 7 9800X3D, Rust 1.100.0 MSVC, DXC 1.8.2502.11, debug. Adapters were NVIDIA GeForce RTX 5090 (32.0.16.1742) and integrated AMD Radeon(TM) Graphics (32.0.21042.62), selected with XCL_ADAPTER.
  • cargo build --workspace --locked passed. cargo test --locked -p xcl --lib -- gpu_dot2_i16_u16_and_dot8_i4_u4 --nocapture --test-threads=1 passed with no skip on each adapter. The test exercised wave32 on NVIDIA and wave32 plus wave64 on AMD. On AMD, cargo test --locked -p xcl --lib -- gpu_wave32_program_in_wave64_hardware --nocapture --test-threads=1 also passed with XCL_REQUIRE_GPU=wave64.
  • cargo test --workspace --locked --no-fail-fast -- --test-threads=4 --show-output on NVIDIA had 771 passed, 0 failed, and 41 ignored. The harness reports two GPU skips in that total, gpu_geometry_wave32_prefix_count_over_a_mask and gpu_wave32_program_in_wave64_hardware, both no wave64. The bundled test title passed.

Not tested

Full workspace suite on the AMD adapter, retail titles, Wine, and release builds.

AI use

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

<!-- greyfinch-sync:ivall/xcl:comment:7138485051 --> Imported from [ivall/xcl](https://github.com/ivall/xcl/pull/1491#issuecomment-7138485051). Originally posted by [nnonno91](https://github.com/nnonno91) on 2026-11-24T16:58:10Z. --- Independent GPU test of `cd4b097f58e3580656f4140241d5a483750558c0`. **Tested** - Windows 11 25H2 (26200.9974), Ryzen 7 9800X3D, Rust 1.100.0 MSVC, DXC 1.8.2502.11, debug. Adapters were NVIDIA GeForce RTX 5090 (32.0.16.1742) and integrated AMD Radeon(TM) Graphics (32.0.21042.62), selected with `XCL_ADAPTER`. - `cargo build --workspace --locked` passed. `cargo test --locked -p xcl --lib -- gpu_dot2_i16_u16_and_dot8_i4_u4 --nocapture --test-threads=1` passed with no skip on each adapter. The test exercised wave32 on NVIDIA and wave32 plus wave64 on AMD. On AMD, `cargo test --locked -p xcl --lib -- gpu_wave32_program_in_wave64_hardware --nocapture --test-threads=1` also passed with `XCL_REQUIRE_GPU=wave64`. - `cargo test --workspace --locked --no-fail-fast -- --test-threads=4 --show-output` on NVIDIA had 771 passed, 0 failed, and 41 ignored. The harness reports two GPU skips in that total, `gpu_geometry_wave32_prefix_count_over_a_mask` and `gpu_wave32_program_in_wave64_hardware`, both `no wave64`. The bundled test title passed. **Not tested** Full workspace suite on the AMD adapter, retail titles, Wine, and release builds. **AI use** OpenAI Codex (GPT-6 family, exact variant unavailable) ran the tests and drafted this report.
DavidM1911 commented 2026-11-24 19:07:45 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by DavidM1911 on 2026-11-24T18:53:29Z.


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

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

Thanks!

<!-- greyfinch-sync:ivall/xcl:comment:7141296548 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1491#issuecomment-7141296548). Originally posted by [DavidM1911](https://github.com/DavidM1911) on 2026-11-24T18:53:29Z. --- Verification on RTX 3060 Ti (Windows 11), branch merged with current `main`: - `cargo test -p xcl --lib`: all passed, 0 failed, ~21 ignored. (Intermittent single-test flake / 0xc0000005 abort under parallel scheduling; clean on single-threaded rerun — same flake seen on unmodified `main`.) Thanks!
upstream-sync closed this pull request 2026-11-25 00:07:22 +00:00

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
xcl-dev/xcl!1481
No description provided.