Repository navigation
Tests: integer-to-float conversions on the GPU - #654
acaracargo wants to merge 1 commit into
Conversation
v_cvt_f32_i32, v_cvt_f32_u32, v_cvt_f32_ubyte0..3 and v_cvt_f64_i32 / u32 / f32 had no edge-value GPU test (only ubyte1 ran). 16 inputs: the ends of the i32 and u32 ranges, 2^24 + 1 and the tie at 2^24 + 3 (round to nearest even), all byte lanes, and f32 infinities and NaN for the f64 conversion. The reference is Rust's `as`, which rounds to nearest even like the ISA's default mode. An f32 denormal is left out of v_cvt_f64_f32: whether it is flushed depends on the f32 denormal mode. This driver flushes it to 0. Measured: RTX 4060 (wave32), Windows 11 Pro 26300, Rust 1.100, debug. cargo test --workspace -- --test-threads=4: 678 passed, 0 failed, 41 ignored; SKIPPED (no wave64): gpu_geometry_wave32_prefix_count_over_a_mask, gpu_wave32_program_in_wave64_hardware. Dropping the (int) cast of v_cvt_f64_i32 or reading the wrong byte for ubyte3 in emit.rs fails the test. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WsgnReN2iZK9RUNckZAhrv
|
AMD / native-wave64 data point (the "Not tested" axis): Setup: Windows 11 Pro 26300, Ryzen 7 7800X3D, 32 GB; adapters: AMD Radeon(TM) Graphics (Raphael iGPU, wave64) and RTX 3080 Ti 12 GB (driver 621.01, wave32-only). PR head Runs (
The cvt rounding paths agree on native wave64 and on the wave32 split path. Not tested: discrete AMD GPUs, other titles. AI use: Gentle Shell (Pi coding agent), model qwen4-max: ran the tests and wrote this report from their logs; a human reviews it before posting. No code changes. |
|
Test run of Tested
Review: i32 / u32 → f32 round to nearest even, Not tested: no retail title (not needed for a test-only change), release build; the PR's head on its old base was not run, only its merge onto Run and review by Claude Code (Claude Opus 5.5) on this machine; the review points were checked against the code. |
|
Independent GPU test report on Tested
Not tested
AI use
|
Empirical test report (6d171e3)Hardware / environment
Commands and results
Observed behavior The recompiler runner reported Not tested Full GPU workspace suite and game smoke runs omitted. AI use Verified with T3 Code / Codex (gpt-6.2-sol, reasoningEffort: high). Coordinator #2 (T3 Code / Antigravity, gemini-4-neon) verified counts against pr654-focused.log and published. |
Adds GPU coverage for
v_cvt_f32_i32,v_cvt_f32_u32,v_cvt_f32_ubyte0..3andv_cvt_f64_i32/u32/f32. Previously, onlyv_cvt_f32_ubyte1was covered by a GPU test.The 16 inputs cover:
The reference uses Rust's
asconversion, which also rounds to nearest even. An f32 denormal is deliberately excluded fromv_cvt_f64_f32, since its preservation depends on the denormal mode and this driver flushes it to zero.#515 covers
v_cvt_f16_u16/i16, which this test does not use.What is in it
crates/xcl/src/gpu/recomp/tests.rs:gpu_int_to_float_conversions.Tested
x86_64-pc-windows-msvc; DXC 1.9.2602.17; debug.cargo test --workspace -- --test-threads=4on6d171e3: 685 passed, 0 failed, 41 ignored (main9ce2070: 684 / 0 / 41).gpu_geometry_wave32_prefix_count_over_a_mask,gpu_wave32_program_in_wave64_hardware(no wave64).(int)cast fromv_cvt_f64_i32or reading the wrong byte forubyte3causes the test to fail (checked locally, reverted).Regression run
Not tested
AI use