Recompiler: round normalized f32 conversions once (#659) #678

Open
ilyaux wants to merge 1 commit from upstream-pr/683 into main
ilyaux commented 2026-11-24 03:27:55 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by ilyaux on 2026-11-24T03:27:55Z.


Fixes #659. Avoid rounding an FP32 product to a halfway value before converting it to UNORM/SNORM.

The runtime fix and first two regression tests are @acaracargo's existing proposal, carried from f4c03b5 and 0bca2d7. This PR adds independent packed-format coverage and native Windows validation. acaracargo is credited as a co-author in the commit.

What is in it

  • emit.rs: round the significand/scale product once with integer arithmetic, preserving clamps and NaN handling.
  • tests.rs: the original two regressions plus eight packed UNORM/SNORM formats, with 64 boundary/edge vectors and different values per channel.
  • README behavior note.

Tested
Head: 02fd1b03c357e5cb4457ca56fd343202de1d3736 (clean tree), based on main 91f9a5e9f03156ea82dc55a18f7704862da7a5db. Windows 11 Home 26300, Ryzen AI 7 350, Rust 1.98.1 MSVC, debug, DXC/DXIL 1.8.2502.11.

  • RTX 5070 Laptop, driver 32.0.16.2124, XCL_ADAPTER=nvidia:
    cargo build --workspace --locked;
    cargo test --workspace --no-fail-fast --locked -- --test-threads=4:
    695 passed, 0 failed, 41 ignored. Two SKIPPED: no wave64 tests are included in that passed count: gpu_geometry_wave32_prefix_count_over_a_mask and gpu_wave32_program_in_wave64_hardware. All three normalization regressions and the synthetic-title end-to-end test ran and passed.
  • Radeon 860M, driver 32.0.32029.2010, XCL_ADAPTER=radeon, XCL_REQUIRE_GPU=wave64:
    cargo test -p xcl --lib gpu_pknorm_f32_rounds_once -- --nocapture;
    cargo test -p xcl --lib norm_formats_round_once -- --nocapture;
    cargo test -p xcl --lib gpu_wave32_program_in_wave64_hardware -- --nocapture:
    3 normalization tests + 1 wave64 control passed, 0 failed/ignored/skipped.
  • Negative controls on the initial main dd2ae9a, keeping tests but removing the runtime fix: 41 pknorm and 54 typed-store mismatches. The added packed-format test also fails (11_11_10_UNORM, got 6291458, expected 6291457).
  • git diff --check passed.

Regression run
Pending: matched scripts/smoke.ps1 runs on main and this PR's clean head. No complete retail title was available locally, so no smoke blocks were generated. Keeping this PR draft until that validation is available.

Not tested
Retail gameplay/performance, real console rounding, Intel GPUs, and the full suite on AMD. XCL_SAMPLE_* was unset, so opt-in real-game-data paths were not exercised.

AI use

  • Original proposal: acaracargo disclosed Claude Code with Claude Opus 5.5 for the fix and its first two tests.
  • Codex, GPT-6: reviewed/carried that proposal onto current main, added the packed-format test and README note, ran the native Windows checks above, and drafted this description.
<!-- greyfinch-sync:ivall/xcl:issue:5465523971 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/683). Originally posted by [ilyaux](https://github.com/ilyaux) on 2026-11-24T03:27:55Z. --- Fixes #659. Avoid rounding an FP32 product to a halfway value before converting it to UNORM/SNORM. The runtime fix and first two regression tests are **@acaracargo's existing proposal**, carried from [f4c03b5](https://github.com/acaracargo/xcl/commit/f4c03b5d666d6ad78f755dbba20762d8cb14c024) and [0bca2d7](https://github.com/acaracargo/xcl/commit/0bca2d7bbb7715c3cad9d65d0301421452239930). This PR adds independent packed-format coverage and native Windows validation. acaracargo is credited as a co-author in the commit. **What is in it** - `emit.rs`: round the significand/scale product once with integer arithmetic, preserving clamps and NaN handling. - `tests.rs`: the original two regressions plus eight packed UNORM/SNORM formats, with 64 boundary/edge vectors and different values per channel. - README behavior note. **Tested** Head: `02fd1b03c357e5cb4457ca56fd343202de1d3736` (clean tree), based on `main` `91f9a5e9f03156ea82dc55a18f7704862da7a5db`. Windows 11 Home 26300, Ryzen AI 7 350, Rust 1.98.1 MSVC, debug, DXC/DXIL 1.8.2502.11. - **RTX 5070 Laptop**, driver 32.0.16.2124, `XCL_ADAPTER=nvidia`: `cargo build --workspace --locked`; `cargo test --workspace --no-fail-fast --locked -- --test-threads=4`: **695 passed, 0 failed, 41 ignored**. Two `SKIPPED: no wave64` tests are included in that passed count: `gpu_geometry_wave32_prefix_count_over_a_mask` and `gpu_wave32_program_in_wave64_hardware`. All three normalization regressions and the synthetic-title end-to-end test ran and passed. - **Radeon 860M**, driver 32.0.32029.2010, `XCL_ADAPTER=radeon`, `XCL_REQUIRE_GPU=wave64`: `cargo test -p xcl --lib gpu_pknorm_f32_rounds_once -- --nocapture`; `cargo test -p xcl --lib norm_formats_round_once -- --nocapture`; `cargo test -p xcl --lib gpu_wave32_program_in_wave64_hardware -- --nocapture`: **3 normalization tests + 1 wave64 control passed**, 0 failed/ignored/skipped. - Negative controls on the initial `main` `dd2ae9a`, keeping tests but removing the runtime fix: 41 pknorm and 54 typed-store mismatches. The added packed-format test also fails (`11_11_10_UNORM`, got 6291458, expected 6291457). - `git diff --check` passed. **Regression run** Pending: matched `scripts/smoke.ps1` runs on main and this PR's clean head. No complete retail title was available locally, so no smoke blocks were generated. Keeping this PR draft until that validation is available. **Not tested** Retail gameplay/performance, real console rounding, Intel GPUs, and the full suite on AMD. `XCL_SAMPLE_*` was unset, so opt-in real-game-data paths were not exercised. **AI use** - Original proposal: acaracargo disclosed Claude Code with Claude Opus 5.5 for the fix and its first two tests. - Codex, GPT-6: reviewed/carried that proposal onto current main, added the packed-format test and README note, ran the native Windows checks above, and drafted this description.
acaracargo commented 2026-11-24 07:06:05 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by acaracargo on 2026-11-24T04:04:37Z.


Thanks for extending my fix and for the attribution! I was actually preparing to open the original branch as a draft PR.

I've also completed local retail regression runs, and @requiemsnkrp offered independent smoke testing on #659.

Let's coordinate so we don't end up with duplicate PRs. I'm happy to help validate this version and get the fix merged.

<!-- greyfinch-sync:ivall/xcl:comment:7121684042 --> Imported from [ivall/xcl](https://github.com/ivall/xcl/pull/683#issuecomment-7121684042). Originally posted by [acaracargo](https://github.com/acaracargo) on 2026-11-24T04:04:37Z. --- Thanks for extending my fix and for the attribution! I was actually preparing to open the original branch as a draft PR. I've also completed local retail regression runs, and @requiemsnkrp offered independent smoke testing on #659. Let's coordinate so we don't end up with duplicate PRs. I'm happy to help validate this version and get the fix merged.
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:29Z.


Test report for 02fd1b03c357e5cb4457ca56fd343202de1d3736 (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: 694 passed, 1 failed, 41 ignored. Same machine, main 64b3f3559: 700 passed, 1 failed, 41 ignored.

This PR's tests:

  • gpu::recomp::tests::gpu_buffer_store_norm_formats_round_once: ok
  • gpu::recomp::tests::gpu_pknorm_f32_rounds_once: ok
  • gpu::recomp::tests::gpu_packed_norm_formats_round_once: 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:7122491990 --> Imported from [ivall/xcl](https://github.com/ivall/xcl/pull/683#issuecomment-7122491990). Originally posted by [ItsMrDubey](https://github.com/ItsMrDubey) on 2026-11-24T04:57:29Z. --- Test report for `02fd1b03c357e5cb4457ca56fd343202de1d3736` (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: **694 passed, 1 failed, 41 ignored**. Same machine, `main` `64b3f3559`: 700 passed, 1 failed, 41 ignored. This PR's tests: - `gpu::recomp::tests::gpu_buffer_store_norm_formats_round_once`: ok - `gpu::recomp::tests::gpu_pknorm_f32_rounds_once`: ok - `gpu::recomp::tests::gpu_packed_norm_formats_round_once`: 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.
Anon64 commented 2026-11-24 07:06:51 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by Anon64 on 2026-11-24T06:43:12Z.


Regression runs for this PR's head 02fd1b0 and for its base main 91f9a5e, on a retail title (same title, 60 s each), made with scripts/smoke.ps1 (release, clean tree at each commit) and pasted unedited, for Regression run.

main:

xcl-smoke v1
commit: 91f9a5e9f03156ea82dc55a18f7704862da7a5db
gpu: NVIDIA GeForce RTX 3060
title: retail-title
seconds: 60
exit: 0x0
frames shown: 1648 (PresentX 1648)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 14684 MB

this PR:

xcl-smoke v1
commit: 02fd1b03c357e5cb4457ca56fd343202de1d3736
gpu: NVIDIA GeForce RTX 3060
title: retail-title
seconds: 60
exit: 0x0
frames shown: 1637 (PresentX 1638)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 14581 MB

Tested

  • NVIDIA GeForce RTX 3060 12 GB (driver 581.80, wave32), Intel Core i9-14900KF, Windows 11 25H2 26200.9974, Rust 1.90.0

Not tested

  • the unit tests on this machine
  • whether the title reaches the changed conversions; this is a regression check only

Report written with Claude Code (Claude Opus 5.5) from runs on this machine.

<!-- greyfinch-sync:ivall/xcl:comment:7124221430 --> Imported from [ivall/xcl](https://github.com/ivall/xcl/pull/683#issuecomment-7124221430). Originally posted by [Anon64](https://github.com/Anon64) on 2026-11-24T06:43:12Z. --- Regression runs for this PR's head `02fd1b0` and for its base `main` `91f9a5e`, on a retail title (same title, 60 s each), made with `scripts/smoke.ps1` (release, clean tree at each commit) and pasted unedited, for **Regression run**. main: ``` xcl-smoke v1 commit: 91f9a5e9f03156ea82dc55a18f7704862da7a5db gpu: NVIDIA GeForce RTX 3060 title: retail-title seconds: 60 exit: 0x0 frames shown: 1648 (PresentX 1648) presents per 2 s (last 3): 60 60 60 device removals: 0 crashes: 0 peak commit: 14684 MB ``` this PR: ``` xcl-smoke v1 commit: 02fd1b03c357e5cb4457ca56fd343202de1d3736 gpu: NVIDIA GeForce RTX 3060 title: retail-title seconds: 60 exit: 0x0 frames shown: 1637 (PresentX 1638) presents per 2 s (last 3): 60 60 60 device removals: 0 crashes: 0 peak commit: 14581 MB ``` **Tested** - NVIDIA GeForce RTX 3060 12 GB (driver 581.80, wave32), Intel Core i9-14900KF, Windows 11 25H2 26200.9974, Rust 1.90.0 **Not tested** - the unit tests on this machine - whether the title reaches the changed conversions; this is a regression check only Report written with Claude Code (Claude Opus 5.5) from runs on this machine.
KENAJBBY commented 2026-11-24 10:04:43 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by KENAJBBY on 2026-11-24T09:31:09Z.


Native RDNA2 (gfx1036): every double-rounding input, and no MODE dependence

This extends @luckyteagirl's 13-input native check on #659 to the whole problem set. I ran v_cvt_pknorm_u16_f32 and v_cvt_pknorm_i16_f32 on raw f32 bits on an RDNA2 GPU. The inputs were every f32 in (0, 1) whose binary32 product with the scale is exactly k + 0.5: 65,536 inputs for 65535 and 32,768 for 32767, each also negated for SNORM16. On top of that came 20,000 random bit patterns and 26 special values. Both halves were checked, with src0 and src1 holding different inputs.

inputs differ from this PR's helpers differ from main's round(f * scale) (CPU model)
v_cvt_pknorm_u16_f32 85,562 0 (both halves) 32,769
v_cvt_pknorm_i16_f32 85,562 0 (both halves) 32,770

The result was 0 in each of 11 MODE values: f32 round RNE / +inf / −inf / RTZ, f32 and f16 denormals flushed or kept, DX10_CLAMP 0/1 and IEEE 0/1. Each mode was set with s_setreg_b32 and read back with s_getreg_b32. The round mode does not apply here: these conversions always round to nearest even.

The special inputs give the same result in all 1024 values of MODE[9:0], and every one matches this PR's helpers:

f32 input u16 i16
±0, denormals (0x00000001, 0x80000001, 0x007FFFFF), 0x00800000, 2^-17 0x0000 0x0000
1.0, 2.0, +inf, 0x3F7FFFFF 0xFFFF 0x7FFF
−1.0, −2.0, −inf, 0xBF7FFFFF 0x0000 0x8001
qNaN, −qNaN, sNaN 0x7F800011 0x0000 0x0000
0.5 / −0.5 0x8000 / 0x0000 0x4000 / 0xC000
0x37C000C0 (#659's example) 0x0001 0x0001
0x38400180 / 0xB8400180 0x0003 / 0x0000 0x0001 / 0xFFFF

@Kadthicu's negative SNORM16 case on #659, -0x38400180, gives 0xFFFF (−1) on the hardware, as they computed. So it is a valid vector for gpu_buffer_store_norm_formats_round_once, if the store path rounds like the ALU instruction (not measured, see below).

Tested

  • AMD Radeon iGPU of a Ryzen 7 9800X3D (gfx1036, RDNA2), driver 32.0.21030.2001, AMD OpenCL 3652.0 (PAL,LC), native wave64; Windows 11 Pro 26200.
  • Inline asm in OpenCL C, one block per lane. It saves MODE, sets it with s_setreg_b32 hwreg(HW_REG_MODE, 0, 10), reads it back with s_getreg_b32 (checked against the requested value in every run), runs the instruction and restores MODE. Reference: this PR's cvt_norm_u16_f32 / cvt_norm_i16_f32 transcribed to Python with exact rational arithmetic.

Not tested

  • Typed buffer stores to UNORM / SNORM formats (buffer_store_format_*) and the f16-source v_cvt_pknorm_*_f16 on the hardware.
  • This PR's HLSL on my GPUs (I compared against a transcription of it); console hardware.

AI use

  • Claude Code (Claude Opus 5.5) wrote the probe and the reference, ran them on this machine and drafted this comment.
<!-- greyfinch-sync:ivall/xcl:comment:7127525449 --> Imported from [ivall/xcl](https://github.com/ivall/xcl/pull/683#issuecomment-7127525449). Originally posted by [KENAJBBY](https://github.com/KENAJBBY) on 2026-11-24T09:31:09Z. --- **Native RDNA2 (`gfx1036`): every double-rounding input, and no MODE dependence** This extends @luckyteagirl's 13-input native check on #659 to the whole problem set. I ran `v_cvt_pknorm_u16_f32` and `v_cvt_pknorm_i16_f32` on raw f32 bits on an RDNA2 GPU. The inputs were **every f32 in (0, 1) whose binary32 product with the scale is exactly k + 0.5**: 65,536 inputs for 65535 and 32,768 for 32767, each also negated for SNORM16. On top of that came 20,000 random bit patterns and 26 special values. Both halves were checked, with `src0` and `src1` holding different inputs. | | inputs | differ from this PR's helpers | differ from `main`'s `round(f * scale)` (CPU model) | |---|---|---|---| | `v_cvt_pknorm_u16_f32` | 85,562 | **0** (both halves) | 32,769 | | `v_cvt_pknorm_i16_f32` | 85,562 | **0** (both halves) | 32,770 | The result was 0 in each of 11 MODE values: f32 round RNE / +inf / −inf / RTZ, f32 and f16 denormals flushed or kept, DX10_CLAMP 0/1 and IEEE 0/1. Each mode was set with `s_setreg_b32` and read back with `s_getreg_b32`. The round mode does not apply here: these conversions always round to nearest even. The special inputs give the same result in all 1024 values of MODE[9:0], and every one matches this PR's helpers: | f32 input | u16 | i16 | |---|---|---| | ±0, denormals (`0x00000001`, `0x80000001`, `0x007FFFFF`), `0x00800000`, 2^-17 | `0x0000` | `0x0000` | | 1.0, 2.0, +inf, `0x3F7FFFFF` | `0xFFFF` | `0x7FFF` | | −1.0, −2.0, −inf, `0xBF7FFFFF` | `0x0000` | `0x8001` | | qNaN, −qNaN, sNaN `0x7F800011` | `0x0000` | `0x0000` | | 0.5 / −0.5 | `0x8000` / `0x0000` | `0x4000` / `0xC000` | | `0x37C000C0` (#659's example) | `0x0001` | `0x0001` | | `0x38400180` / `0xB8400180` | `0x0003` / `0x0000` | `0x0001` / `0xFFFF` | @Kadthicu's negative SNORM16 case on #659, `-0x38400180`, gives `0xFFFF` (−1) on the hardware, as they computed. So it is a valid vector for `gpu_buffer_store_norm_formats_round_once`, if the store path rounds like the ALU instruction (not measured, see below). **Tested** - AMD Radeon iGPU of a Ryzen 7 9800X3D (`gfx1036`, RDNA2), driver 32.0.21030.2001, AMD OpenCL `3652.0 (PAL,LC)`, native wave64; Windows 11 Pro 26200. - Inline asm in OpenCL C, one block per lane. It saves MODE, sets it with `s_setreg_b32 hwreg(HW_REG_MODE, 0, 10)`, reads it back with `s_getreg_b32` (checked against the requested value in every run), runs the instruction and restores MODE. Reference: this PR's `cvt_norm_u16_f32` / `cvt_norm_i16_f32` transcribed to Python with exact rational arithmetic. **Not tested** - Typed buffer stores to UNORM / SNORM formats (`buffer_store_format_*`) and the f16-source `v_cvt_pknorm_*_f16` on the hardware. - This PR's HLSL on my GPUs (I compared against a transcription of it); console hardware. **AI use** - Claude Code (Claude Opus 5.5) wrote the probe and the reference, ran them on this machine and drafted this comment.
DavidM1911 commented 2026-11-25 12:06:38 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by DavidM1911 on 2026-11-25T12:06:19Z.


Verification on RTX 3060 Ti (Windows 11): merge conflict with current main — needs a rebase before it can be tested.

<!-- greyfinch-sync:ivall/xcl:comment:7161924987 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/683#issuecomment-7161924987). Originally posted by [DavidM1911](https://github.com/DavidM1911) on 2026-11-25T12:06:19Z. --- Verification on RTX 3060 Ti (Windows 11): **merge conflict with current `main`** — needs a rebase before it can be tested.
github-actions[bot] commented 2026-11-29 07:42:18 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by github-actions[bot] on 2026-11-29T07:42:18Z.


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:7252638251 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/683#issuecomment-7252638251). Originally posted by [github-actions[bot]](https://github.com/apps/github-actions) on 2026-11-29T07:42:18Z. --- 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.
Foniass commented 2026-12-01 03:56:39 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by Foniass on 2026-12-01T03:56:39Z.


Triage (#1607) – head 02fd1b0

No open or merged PR rounds the f32 -> UNORM/SNORM encodes once. #1840 (normalized buffer loads to f32) and #2030 (D16 image reads) cover the decode direction, so they do not overlap with fmt_encode / v_cvt_pknorm_*_f32 here.
The diff looks correct: norm_f32_mag rounds the exact 24x32-bit product to nearest even, and the GPU tests compare against a reference. Rebase note: main's fmt_encode has changed since this branch was cut. fc5a8ef made a 2-bit SNORM component round a half away from zero, and this PR's SNORM path (norm_f32_mag, nearest even) would drop that rule if the conflict is resolved by taking this side.
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:7300219748 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/683#issuecomment-7300219748). Originally posted by [Foniass](https://github.com/Foniass) on 2026-12-01T03:56:39Z. --- **Triage (#1607)** – head 02fd1b0 No open or merged PR rounds the f32 -> UNORM/SNORM encodes once. #1840 (normalized buffer loads to f32) and #2030 (D16 image reads) cover the decode direction, so they do not overlap with `fmt_encode` / `v_cvt_pknorm_*_f32` here. The diff looks correct: `norm_f32_mag` rounds the exact 24x32-bit product to nearest even, and the GPU tests compare against a reference. Rebase note: main's `fmt_encode` has changed since this branch was cut. fc5a8ef made a 2-bit SNORM component round a half away from zero, and this PR's SNORM path (`norm_f32_mag`, nearest even) would drop that rule if the conflict is resolved by taking this side. Recommendation: keep open. AI review: Claude Code (Claude Opus 5.5), diffs read only, not built or run; not checked by a human.
Kadthicu commented 2026-12-01 05:19:40 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by Kadthicu on 2026-12-01T05:19:40Z.


I rebased PR #683 onto main (d0832e6) and tested local commit 1b24f22 on Windows 11 with an RTX 3060 12 GB. The commit has not been pushed yet.
The rebase preserves half-away-from-zero rounding for 2-bit SNORM and rounds the exact product once, ties to even, for the other normalized FP32 conversions. All four targeted GPU tests passed on both HLSL and direct DXIL. The workspace build passed. The full suite reported 2,892 passed, 1 failed, and 51 ignored, with 29 skip messages. The sole failure, console_mesh_caches_hlsl_compute_pass_in_memory_and_on_disk, also reproduced on clean main.
Both 60-second smoke runs completed without crashes or GPU device removals. main: 1,003 frames, 15,970 MB peak commit. Local rebased commit: 935 frames, 15,893 MB peak commit.
AI use: OpenAI Codex assisted with the rebase, implementation, and test runs.

<!-- greyfinch-sync:ivall/xcl:comment:7301654392 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/683#issuecomment-7301654392). Originally posted by [Kadthicu](https://github.com/Kadthicu) on 2026-12-01T05:19:40Z. --- I rebased PR #683 onto main (d0832e6) and tested local commit 1b24f22 on Windows 11 with an RTX 3060 12 GB. The commit has not been pushed yet. The rebase preserves half-away-from-zero rounding for 2-bit SNORM and rounds the exact product once, ties to even, for the other normalized FP32 conversions. All four targeted GPU tests passed on both HLSL and direct DXIL. The workspace build passed. The full suite reported 2,892 passed, 1 failed, and 51 ignored, with 29 skip messages. The sole failure, console_mesh_caches_hlsl_compute_pass_in_memory_and_on_disk, also reproduced on clean main. Both 60-second smoke runs completed without crashes or GPU device removals. main: 1,003 frames, 15,970 MB peak commit. Local rebased commit: 935 frames, 15,893 MB peak commit. AI use: OpenAI Codex assisted with the rebase, implementation, and test runs.
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/683:upstream-pr/683'
git switch 'upstream-pr/683'

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/683'
git switch 'upstream-pr/683'
git rebase 'main'
git switch 'main'
git merge --ff-only 'upstream-pr/683'
git switch 'upstream-pr/683'
git rebase 'main'
git switch 'main'
git merge --no-ff 'upstream-pr/683'
git switch 'main'
git merge --squash 'upstream-pr/683'
git switch 'main'
git merge --ff-only 'upstream-pr/683'
git switch 'main'
git merge 'upstream-pr/683'
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!678
No description provided.