Tests: add synthetic core and format benchmarks #1139

Closed
bmjask wants to merge 1 commit from upstream-pr/1148 into main
bmjask commented 2026-11-24 12:33:46 +00:00 (Migrated from github.com)

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


Adds Criterion targets for RDNA2 instruction handling, descriptors, parsers, shader-pack scans, and PE parsing. Inputs are generated or come from the benchmark executable, so no game data is required.

What is in it

  • crates/xcl/benches/core.rs: focused decoder and descriptor microbenchmarks
  • crates/xcl/benches/formats.rs: generated-input format, pack, and PE benchmarks
  • crates/xcl/Cargo.toml, Cargo.lock, and README.md: Criterion 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 f73d165: 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 -- --test: both targets built; all 21 benchmarks succeeded; xcl lib tests in the bench profile: 698 passed, 0 failed, 21 ignored

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 and original description. 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:5472230912 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1148). Originally posted by [bmjask](https://github.com/bmjask) on 2026-11-24T12:33:46Z. --- Adds Criterion targets for RDNA2 instruction handling, descriptors, parsers, shader-pack scans, and PE parsing. Inputs are generated or come from the benchmark executable, so no game data is required. **What is in it** - `crates/xcl/benches/core.rs`: focused decoder and descriptor microbenchmarks - `crates/xcl/benches/formats.rs`: generated-input format, pack, and PE benchmarks - `crates/xcl/Cargo.toml`, `Cargo.lock`, and `README.md`: Criterion 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 `f73d165`: `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 -- --test`: both targets built; all 21 benchmarks succeeded; xcl lib tests in the bench profile: 698 passed, 0 failed, 21 ignored **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 and original description. 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:52 +00:00 (Migrated from github.com)

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


Full-suite run, since this PR has no test report yet. Tested exact head f73d165 (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.
  • cargo bench -p xcl -- --test (each benchmark run once): both new bench targets (core, formats) build in the bench profile, and all 21 benchmarks report Success; the xcl lib tests in that profile: 698 passed, 0 failed, 21 ignored. 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:7134350604 --> Imported from [ivall/xcl](https://github.com/ivall/xcl/pull/1148#issuecomment-7134350604). Originally posted by [futurepro62](https://github.com/futurepro62) on 2026-11-24T14:25:27Z. --- Full-suite run, since this PR has no test report yet. Tested exact head `f73d165` (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`. - `cargo bench -p xcl -- --test` (each benchmark run once): both new bench targets (`core`, `formats`) build in the bench profile, and all 21 benchmarks report `Success`; the xcl lib tests in that profile: 698 passed, 0 failed, 21 ignored. 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:22 +00:00 (Migrated from github.com)

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


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:7156532819 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1148#issuecomment-7156532819). Originally posted by [DavidM1911](https://github.com/DavidM1911) on 2026-11-25T08:02:15Z. --- 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!
upstream-sync changed title from [PR #1148] Tests: add synthetic benchmark foundation to [PR #1148] Tests: add synthetic core and format benchmarks 2026-11-25 14:08:24 +00:00
ivall commented 2026-11-25 14:10:08 +00:00 (Migrated from github.com)

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


Review of head f73d165. I read the whole diff before building anything: two bench files, a Cargo change (dev-dependency and four [[bench]] entries), README text and the lockfile. No process spawning, no network access, no build.rs, no workflow changes, no binaries. The benchmarks only call public xcl APIs on generated input (the PE benchmark parses the bench executable itself).

Tested on the stack tip (#1148 + #1152 + #1153 merged onto current main, since the three are stacked; this PR's files are a subset): 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 gpu::dxil::fuzz_tests::fuzz_validate_and_gpu_1 and _3 (#2115), also failing on main.
  • cargo bench -p xcl --bench core -- --test and --bench formats -- --test: 2 + 19 = 21 benchmarks succeeded. No timings taken.

Dependency finding: criterion 0.7 is a dev-dependency only (not in cargo tree -e normal,build), and Cargo.lock only adds 28 crates, no existing crate is bumped. Licences are dual MIT/Apache-2.0 or similar except ciborium, ciborium-io and ciborium-ll, which are Apache-2.0 only and are pulled in by criterion itself (it cannot be disabled with default-features = false). CONTRIBUTING.md says dependencies must be GPL-2.0-compatible and names Apache-2.0-only as not allowed. They never end up in xcl.exe or the test binaries, only in the local bench executables, but this is not my call to waive, so I am leaving the PR open and not merging. Options: the maintainer accepts a bench-only exception, or the benchmarks use a harness without ciborium (for example a small std::time harness, or a different crate).

Also: the PR description check fails because the regression-run blocks are missing; for a bench-only diff that is what the test-only label is for, which only the maintainer applies.

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:7164398759 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1148#issuecomment-7164398759). Originally posted by [ivall](https://github.com/ivall) on 2026-11-25T13:51:46Z. --- Review of head f73d165. I read the whole diff before building anything: two bench files, a Cargo change (dev-dependency and four `[[bench]]` entries), README text and the lockfile. No process spawning, no network access, no build.rs, no workflow changes, no binaries. The benchmarks only call public xcl APIs on generated input (the PE benchmark parses the bench executable itself). Tested on the stack tip (#1148 + #1152 + #1153 merged onto current main, since the three are stacked; this PR's files are a subset): 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 `gpu::dxil::fuzz_tests::fuzz_validate_and_gpu_1` and `_3` (#2115), also failing on main. - `cargo bench -p xcl --bench core -- --test` and `--bench formats -- --test`: 2 + 19 = 21 benchmarks succeeded. No timings taken. Dependency finding: `criterion 0.7` is a dev-dependency only (not in `cargo tree -e normal,build`), and Cargo.lock only adds 28 crates, no existing crate is bumped. Licences are dual MIT/Apache-2.0 or similar except `ciborium`, `ciborium-io` and `ciborium-ll`, which are **Apache-2.0 only** and are pulled in by criterion itself (it cannot be disabled with `default-features = false`). CONTRIBUTING.md says dependencies must be GPL-2.0-compatible and names Apache-2.0-only as not allowed. They never end up in xcl.exe or the test binaries, only in the local bench executables, but this is not my call to waive, so I am leaving the PR open and not merging. Options: the maintainer accepts a bench-only exception, or the benchmarks use a harness without ciborium (for example a small `std::time` harness, or a different crate). Also: the `PR description` check fails because the regression-run blocks are missing; for a bench-only diff that is what the `test-only` label is for, which only the maintainer applies. 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-29 20:41:29 +00:00 (Migrated from github.com)

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


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:7262281198 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1148#issuecomment-7262281198). Originally posted by [github-actions[bot]](https://github.com/apps/github-actions) on 2026-11-29T20:41:29Z. --- 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:47 +00:00 (Migrated from github.com)

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


Review (head f73d165e, diff read, not a merge-check; it conflicts with main, so not built or run):

  • Already on main: c35d24a8 ("Tests: add synthetic benchmark foundation", merged with #2959) brings the same core.rs and formats.rs benchmarks over to the dependency-free harness in crates/xcl/benches/support, so the Criterion dev-dependency (and the 28 lock entries it adds, compiled on every cargo test) is no longer needed.

Fine: inputs are generated (no game data), and the added crates (MIT / Apache-2.0 / Unlicense / BSD-2) were GPL-3.0-compatible. Recommendation: close as superseded by c35d24a8.

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

<!-- greyfinch-sync:ivall/xcl:comment:7303091151 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1148#issuecomment-7303091151). Originally posted by [Foniass](https://github.com/Foniass) on 2026-12-01T06:37:47Z. --- Review (head f73d165e, diff read, not a merge-check; it conflicts with main, so not built or run): - **Already on main:** c35d24a8 ("Tests: add synthetic benchmark foundation", merged with #2959) brings the same `core.rs` and `formats.rs` benchmarks over to the dependency-free harness in `crates/xcl/benches/support`, so the Criterion dev-dependency (and the 28 lock entries it adds, compiled on every `cargo test`) is no longer needed. Fine: inputs are generated (no game data), and the added crates (MIT / Apache-2.0 / Unlicense / BSD-2) were GPL-3.0-compatible. Recommendation: close as superseded by c35d24a8. AI review: Claude Code (Claude Opus 5.5), posted by Foniass without a human check of each point.
throny commented 2026-12-01 12:42:53 +00:00 (Migrated from github.com)

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


Closing as superseded: this change is already on main (c35d24a8). c35d24a8 adds crates/xcl/benches/core.rs and formats.rs with the same bench ids (rdna2/decode_vop2, descriptor/component_mapping, disassemble, manifest_xml ...) without the criterion dependency; PR's criterion dev-dependency and Cargo.lock are intentionally not carried

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:7311539718 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1148#issuecomment-7311539718). Originally posted by [throny](https://github.com/throny) on 2026-12-01T12:42:53Z. --- Closing as superseded: this change is already on `main` (c35d24a8). c35d24a8 adds crates/xcl/benches/core.rs and formats.rs with the same bench ids (rdna2/decode_vop2, descriptor/component_mapping, disassemble, manifest_xml ...) without the criterion dependency; PR's criterion dev-dependency and Cargo.lock are intentionally not carried 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!1139
No description provided.