Tests: benchmark shader translation and runtime hot paths #1143

Closed
bmjask wants to merge 2 commits from upstream-pr/1152 into main
bmjask commented 2026-11-24 12:34:56 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by bmjask on 2026-11-24T12:34:56Z.


Adds generated-input benchmarks for runtime and shader hot paths, stacked on the benchmark foundation in #1148. The added targets exercise GPU/CPU translation and runtime utility, configuration, and VFS paths without game data.

What is in it

  • crates/xcl/benches/gpu_cpu.rs: shader translation and GPU/CPU hot-path benchmarks
  • crates/xcl/benches/runtime.rs: runtime utility, configuration, and VFS benchmarks
  • crates/xcl/Cargo.toml, Cargo.lock, and README.md: benchmark targets, lockfile, and usage

Tested

  • NVIDIA GeForce RTX 5070 Ti 16 GB, driver 616.64; Ryzen 7 9800X3D; Windows 11 Home 26300; Rust 1.100.0 MSVC; debug
  • External report on exact head f84d850: cargo build --workspace, then XCL_REQUIRE_GPU=mesh cargo test --workspace -- --test-threads=4: 741 passed, 0 failed, 41 ignored; skipped gpu_geometry_wave32_prefix_count_over_a_mask and gpu_wave32_program_in_wave64_hardware (no wave64)
  • cargo bench -p xcl --benches -- --test: all four targets built and all 68 benchmarks succeeded
  • The initial CI run had two unrelated kernelx test failures; the clean external rerun above passed

Regression run

  • The diff adds Criterion as a dev-dependency, benchmark targets, documentation and generated lockfile entries. No production source files change. Requesting maintainer review for the documented test-only approval on this revision. No paired retail smoke results are available.

Not tested

  • AMD, release, or a retail title; no benchmark timings were taken

AI use

  • OpenAI Codex with GPT-5 wrote the implementation. Claude Code with Claude Opus 5.5 ran the external validation and wrote the test report; the contributor checked it before posting.

  • OpenAI Codex (GPT-6.2 Astra) checked the changed files and CI logs and revised the title and regression-run explanation.

<!-- greyfinch-sync:ivall/xcl:issue:5472248154 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1152). Originally posted by [bmjask](https://github.com/bmjask) on 2026-11-24T12:34:56Z. --- Adds generated-input benchmarks for runtime and shader hot paths, stacked on the benchmark foundation in #1148. The added targets exercise GPU/CPU translation and runtime utility, configuration, and VFS paths without game data. **What is in it** - `crates/xcl/benches/gpu_cpu.rs`: shader translation and GPU/CPU hot-path benchmarks - `crates/xcl/benches/runtime.rs`: runtime utility, configuration, and VFS benchmarks - `crates/xcl/Cargo.toml`, `Cargo.lock`, and `README.md`: benchmark targets, lockfile, and usage **Tested** - NVIDIA GeForce RTX 5070 Ti 16 GB, driver 616.64; Ryzen 7 9800X3D; Windows 11 Home 26300; Rust 1.100.0 MSVC; debug - External report on exact head `f84d850`: `cargo build --workspace`, then `XCL_REQUIRE_GPU=mesh cargo test --workspace -- --test-threads=4`: 741 passed, 0 failed, 41 ignored; skipped `gpu_geometry_wave32_prefix_count_over_a_mask` and `gpu_wave32_program_in_wave64_hardware` (no wave64) - `cargo bench -p xcl --benches -- --test`: all four targets built and all 68 benchmarks succeeded - The initial CI run had two unrelated `kernelx` test failures; the clean external rerun above passed **Regression run** - The diff adds Criterion as a dev-dependency, benchmark targets, documentation and generated lockfile entries. No production source files change. Requesting maintainer review for the documented `test-only` approval on this revision. No paired retail smoke results are available. **Not tested** - AMD, release, or a retail title; no benchmark timings were taken **AI use** - OpenAI Codex with GPT-5 wrote the implementation. Claude Code with Claude Opus 5.5 ran the external validation and wrote the test report; the contributor checked it before posting. - OpenAI Codex (GPT-6.2 Astra) checked the changed files and CI logs and revised the title and regression-run explanation.
futurepro62 commented 2026-11-24 15:05:53 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by futurepro62 on 2026-11-24T14:30:11Z.


Full-suite run, since this PR has no test report yet. Tested exact head f84d850 (on its base 47efa2e).

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: 741 passed, 0 failed, 41 ignored. SKIPPED (no wave64): gpu_geometry_wave32_prefix_count_over_a_mask, gpu_wave32_program_in_wave64_hardware.
  • My first run of this head had 40 failures (mostly gpu::recomp tests, starting with a device removal, 0x887A0005), but it overlapped other GPU jobs I was running on the same machine. The rerun above, with nothing else on the GPU, is clean.
  • cargo bench -p xcl --benches -- --test (each benchmark run once): all four bench targets (core, formats, gpu_cpu, runtime) build in the bench profile, and all 68 benchmarks report Success. No timings taken.

Not tested

  • AMD, a release build, a game (test run only).

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:7134479817 --> Imported from [ivall/xcl](https://github.com/ivall/xcl/pull/1152#issuecomment-7134479817). Originally posted by [futurepro62](https://github.com/futurepro62) on 2026-11-24T14:30:11Z. --- Full-suite run, since this PR has no test report yet. Tested exact head `f84d850` (on its base `47efa2e`). **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`: **741 passed, 0 failed, 41 ignored**. SKIPPED (no wave64): `gpu_geometry_wave32_prefix_count_over_a_mask`, `gpu_wave32_program_in_wave64_hardware`. - My first run of this head had 40 failures (mostly `gpu::recomp` tests, starting with a device removal, `0x887A0005`), but it overlapped other GPU jobs I was running on the same machine. The rerun above, with nothing else on the GPU, is clean. - `cargo bench -p xcl --benches -- --test` (each benchmark run once): all four bench targets (`core`, `formats`, `gpu_cpu`, `runtime`) build in the bench profile, and all 68 benchmarks report `Success`. No timings taken. **Not tested** - AMD, a release build, a game (test run only). **AI use** - Claude Code (Claude Opus 5.5) ran the tests and wrote this report. I checked it before posting.
DavidM1911 commented 2026-11-25 08:08:21 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by DavidM1911 on 2026-11-25T08:02:13Z.


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

  • cargo test -p xcl --lib: all passed, 0 failed, ~26 ignored. (Intermittent single-test flake / 0xc0000005 abort under parallel scheduling — tracked in #1978; clean on single-threaded rerun.)

Thanks!

<!-- greyfinch-sync:ivall/xcl:comment:7156532402 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1152#issuecomment-7156532402). Originally posted by [DavidM1911](https://github.com/DavidM1911) on 2026-11-25T08:02:13Z. --- Verification on RTX 3060 Ti (Windows 11), branch merged with current `main`: - `cargo test -p xcl --lib`: all passed, 0 failed, ~26 ignored. (Intermittent single-test flake / 0xc0000005 abort under parallel scheduling — tracked in #1978; clean on single-threaded rerun.) Thanks!
ivall commented 2026-11-25 14:10:09 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by ivall on 2026-11-25T13:51:47Z.


Review of head f84d850 (stacked on #1148, so this PR needs #1148 first). I read the whole diff (benches/gpu_cpu.rs, benches/runtime.rs, Cargo/README/lockfile) before building: no process spawning, no network, no build.rs, no workflow changes, no binaries; inputs are generated, the VFS benchmark only classifies path strings and touches no files.

Tested on the stack tip (#1148 + #1152 + #1153 merged onto current main): AMD RDNA4, Windows, DXC 1.8.2502.11, debug.

  • cargo build --workspace: ok
  • cargo test --workspace --no-fail-fast -- --test-threads=4: 1263 passed, 2 failed, 46 ignored; the two failures are the known fuzz_validate_and_gpu_1 and _3 (#2115), also failing on main.
  • The two CI failures, hle::kernelx::tests::a_page_away_from_home_is_committed_once and a_page_whose_move_fails_stays_mapped_where_it_was (page commit/move tests in kernelx.rs, host virtual memory), passed in the full run here and again alone (4 passed, 0 failed with the a_page filter). The PR changes no production source, so I judge them flaky and unrelated to it (CI passed on the stack tip #1153, which contains the same code).
  • cargo bench -p xcl --bench gpu_cpu -- --test: 18 benchmarks succeeded; --bench runtime: 29. With #1148's 21 that is 68. No timings taken.

Same dependency finding as in #1148: criterion is dev-only, but its transitive ciborium crates are Apache-2.0 only, which CONTRIBUTING.md excludes. Not merging until that is decided; leaving this PR open.

AI use: Claude Code (Claude Sonnet 5.5) read the diff, ran the tests and wrote this on the maintainer's behalf.

<!-- greyfinch-sync:ivall/xcl:comment:7164399294 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1152#issuecomment-7164399294). Originally posted by [ivall](https://github.com/ivall) on 2026-11-25T13:51:47Z. --- Review of head f84d850 (stacked on #1148, so this PR needs #1148 first). I read the whole diff (`benches/gpu_cpu.rs`, `benches/runtime.rs`, Cargo/README/lockfile) before building: no process spawning, no network, no build.rs, no workflow changes, no binaries; inputs are generated, the VFS benchmark only classifies path strings and touches no files. Tested on the stack tip (#1148 + #1152 + #1153 merged onto current main): AMD RDNA4, Windows, DXC 1.8.2502.11, debug. - `cargo build --workspace`: ok - `cargo test --workspace --no-fail-fast -- --test-threads=4`: 1263 passed, 2 failed, 46 ignored; the two failures are the known `fuzz_validate_and_gpu_1` and `_3` (#2115), also failing on main. - The two CI failures, `hle::kernelx::tests::a_page_away_from_home_is_committed_once` and `a_page_whose_move_fails_stays_mapped_where_it_was` (page commit/move tests in kernelx.rs, host virtual memory), passed in the full run here and again alone (4 passed, 0 failed with the `a_page` filter). The PR changes no production source, so I judge them flaky and unrelated to it (CI passed on the stack tip #1153, which contains the same code). - `cargo bench -p xcl --bench gpu_cpu -- --test`: 18 benchmarks succeeded; `--bench runtime`: 29. With #1148's 21 that is 68. No timings taken. Same dependency finding as in #1148: criterion is dev-only, but its transitive `ciborium` crates are Apache-2.0 only, which CONTRIBUTING.md excludes. Not merging until that is decided; leaving this PR open. AI use: Claude Code (Claude Sonnet 5.5) read the diff, ran the tests and wrote this on the maintainer's behalf.
github-actions[bot] commented 2026-11-28 20:17:28 +00:00 (Migrated from github.com)

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


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:7245177652 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1152#issuecomment-7245177652). Originally posted by [github-actions[bot]](https://github.com/apps/github-actions) on 2026-11-28T20:17:28Z. --- 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 06:37:50 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by Foniass on 2026-12-01T06:37:50Z.


Review (head f84d8501, diff read, not a merge-check; it conflicts with main, so not built or run). Stacked on #1148.

  • Already on main: 1120fdc9 ("Tests: benchmark runtime and shader hot paths", merged with #2959) brings this PR's gpu_cpu.rs and runtime.rs over to the dependency-free harness, and main has gone further since (500+ more lines in runtime.rs). The README text here still describes Criterion and target/criterion, which main no longer has.

Fine: the benchmarks use generated inputs only and don't change runtime code. Recommendation: close as superseded by 1120fdc9.

AI review: Claude Code (Claude Opus 5.5), posted by Foniass without a human check of each point.

<!-- greyfinch-sync:ivall/xcl:comment:7303092227 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1152#issuecomment-7303092227). Originally posted by [Foniass](https://github.com/Foniass) on 2026-12-01T06:37:50Z. --- Review (head f84d8501, diff read, not a merge-check; it conflicts with main, so not built or run). Stacked on #1148. - **Already on main:** 1120fdc9 ("Tests: benchmark runtime and shader hot paths", merged with #2959) brings this PR's `gpu_cpu.rs` and `runtime.rs` over to the dependency-free harness, and main has gone further since (500+ more lines in `runtime.rs`). The README text here still describes Criterion and `target/criterion`, which main no longer has. Fine: the benchmarks use generated inputs only and don't change runtime code. Recommendation: close as superseded by 1120fdc9. AI review: Claude Code (Claude Opus 5.5), posted by Foniass without a human check of each point.
throny commented 2026-12-01 12:43:03 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by throny on 2026-12-01T12:43:03Z.


Closing as superseded: this change is already on main (1120fdc9). main 1120fdc9 'Tests: benchmark runtime and shader hot paths' adapts this PR (benches/gpu_cpu.rs, runtime.rs, Cargo.toml bench targets); benches core.rs/formats.rs (the stacked #1148 part) already exist on main

Two independent checks found this: Foniass's close list on #1607 and ours against current main. If something here is still missing on main, say so and reopen it, or ask and I will.

AI use: Claude Code (Claude Opus 5.5); the per-PR comparison was done by Claude Sonnet 5.5 sub-agents.

<!-- greyfinch-sync:ivall/xcl:comment:7311543901 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1152#issuecomment-7311543901). Originally posted by [throny](https://github.com/throny) on 2026-12-01T12:43:03Z. --- Closing as superseded: this change is already on `main` (1120fdc9). main 1120fdc9 'Tests: benchmark runtime and shader hot paths' adapts this PR (benches/gpu_cpu.rs, runtime.rs, Cargo.toml bench targets); benches core.rs/formats.rs (the stacked #1148 part) already exist on main Two independent checks found this: Foniass's close list on #1607 and ours against current `main`. If something here is still missing on `main`, say so and reopen it, or ask and I will. AI use: Claude Code (Claude Opus 5.5); the per-PR comparison was done by Claude Sonnet 5.5 sub-agents.

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!1143
No description provided.