feat(agc): run hardware oracle kernels through the recompiler on Vulkan #12348

Merged
vingelvatten merged 3 commits from upstream-pr/12348 into main 2026-11-02 13:37:27 +00:00
vingelvatten commented 2026-10-28 10:30:14 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by vingelvatten on 2026-10-28T10:30:14Z.


What

tools/hw-oracle measures RDNA instructions on a local AMD GPU, but nothing ran the same kernel through the shader recompiler, so a difference between the recompiler and the hardware could only be found by hand (#10771, #10772 and #10922 came from a private harness).

  • agc_oracle_runner (core/libs/prx/libSceAgcDriver/tools/OracleRunner.cpp, built with cmake --build build --target agc_oracle_runner) takes the HSA code object the oracle assembles from template.s, reads the probe text and the probe.kd kernel descriptor (wave size, LDS, FLOAT_MODE, DX10_CLAMP, IEEE, FP16_OVFL, workgroup-id and thread-id enables), refuses every other kernel ABI (scratch, a kernarg size other than 16, user SGPRs other than the kernarg pointer), and dispatches one workgroup through the recompiler on the Vulkan device with the oracle binary's argument convention. The guest block holding the kernarg pair, the rows plus extra bytes and the 16-dword outputs is registered through GuestAllocations and passed as a memory region, which the recompiler needs to resolve the kernarg pointer at compile time.
  • HW_ORACLE_RUNTIME=vulkan in hw_oracle.py assembles exactly as the hip and hsa runtimes do and dispatches through the runner named by HW_ORACLE_VULKAN_RUNNER; --json reports carry a runtime field. One body and one set of rows run on the hardware and on the recompiler, and compare_results.py lists the differing words.
  • Tests: agc_oracle_code_object (host only) parses a code object built in memory and checks every descriptor rejection names its field; agc_driver_oracle_runner dispatches the pinned template text around v_add_f16 v10, v4, v5 plus a global_load_dword of each lane's extra dword over two waves and checks every lane against rows measured on a gfx1036; test_hw_oracle.py covers the new runtime without a GPU.
  • Docs: HW_ORACLE.md gains a Recompiler comparison section; the runner's ABI limits are a debt entry in libSceAgcDriver.md.

First result from the harness, to be reported separately: scalar v_add_f16, v_sub_f16, v_mul_f16 and v_fma_f16 return the canonical NaN on NVIDIA and the other operand's NaN on AMD's Vulkan driver where the hardware returns the first operand's NaN (sign-adjusted for v_sub_f16, quieted only with IEEE=1); packed f16, v_max_f16 and v_add_f32 match bit for bit.

Tested

Windows 11 Pro 26300, Ryzen 7 7800X3D, WinLibs GCC 15.2.0 r7 UCRT, Release, BUILD_TESTING=ON. The branch is rebased onto main ab6f5d32ed (head cc920eae69), with the test registrations moved to tests/cmake/ by tools/agc_test_split.py resolve; the runs below name the base each was made on. On this head the five focused tests with the validation layer pass on both Windows GPUs with no VUID- line, test_hw_oracle.py runs 68 tests OK (3 skipped) and the conventions check passes; lavapipe was last run on 85bf4de89c.

  • ctest -R "agc_oracle_code_object|agc_driver_oracle_runner": both pass on the RTX 4070 Ti SUPER and on the Radeon iGPU (ANYPS5_REQUIRE_VULKAN=1 ANYPS5_NO_SHADER_CACHE=1).
  • py -3 tools/hw-oracle/test_hw_oracle.py: 58 tests, OK (3 skipped, as on main) at head 85bf4de89c.
  • End to end through the CLI: the test body with extra bytes, 64 rows, --json on the hardware (hip) and through vulkan on each GPU; compare_results.py reports Compared 64 rows x 2 registers: 0 differing words for both.
  • py -3 tools/check_conventions.py --base origin/main: passes.
  • Validation layer (Vulkan SDK 1.4.363.0): ctest -V with VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation, ANYPS5_NO_SHADER_CACHE=1, ANYPS5_REQUIRE_VULKAN=1 and VK_LOADER_DEBUG=layer, on each GPU, for the compute tests closest to the runner's dispatch path (agc_driver_exec_host_lanes, agc_driver_bda_span_reads, agc_driver_bda_anchor_reads) on main 3a40945e62 (the merge base at the time) and on the PR head da44162ea6, plus agc_driver_oracle_runner and agc_oracle_code_object on the head, and the five tests again on the rebased head 85bf4de89c, and the runner itself through the CLI run above. Every log has Insert instance layer "VK_LAYER_KHRONOS_validation" once per device creation, none has was not found but was requested by env var VK_INSTANCE_LAYERS, and none has a VUID- line, on main or on the head, on either GPU. The same comparison was first made against main 0cd07dc4ab before the rebase, with the same result.
  • Linux (WSL2 Ubuntu 26.04.1, GCC 15.2.0, CMake 4.2.3, Ninja 1.13.2, Python 3.14.4, Mesa 26.0.8 lavapipe, LLVM 21.1.8, clang 21.1.6 and lld 21.1.6 for the oracle's Linux assembly route, validation layer 1.4.341.0), head da44162ea6, BUILD_TESTING=ON with ANYPS5_AGC_EXECUTION_TESTS=OracleRunner;ExecHostLanes;BdaSpanReads;BdaAnchorReads: agc_oracle_runner and the libs target build; ctest -V for the five tests above with ANYPS5_GPU=llvmpipe, ANYPS5_REQUIRE_VULKAN=1, ANYPS5_NO_SHADER_CACHE=1, VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation and VK_LOADER_DEBUG=layer passes 5 of 5 (agc_driver_oracle_runner in 10.3 s; it checks the f16 denormal row there, lavapipe keeps it), with the layer insert line per device creation, no missing-layer line and no VUID- line. test_hw_oracle.py: 57 tests, OK, 1 skipped (58 at head 85bf4de89c). The same five tests and the CLI comparison were repeated on the rebased head 85bf4de89c with the same result. The CLI route with HW_ORACLE_RUNTIME=vulkan, HW_ORACLE_TARGET=gfx1036 and clang+lld assembly on the test body with extra bytes: Compared 64 rows x 2 registers: 0 differing words against the gfx1036 hardware report.
  • Head d24216ada0 (third commit) replaces the runner's strtoul count parsing with ParseOracleCount, decimal digits only up to 4294967295, so a negative string can no longer wrap into a valid threads or out_dwords; agc_oracle_code_object covers the wraparound values, signs, blanks, suffixes and overflow for both fields and passes; the built runner rejects -18446744073709551615 and -18446744073709551600 with exit 1.
  • agc_driver_oracle_runner on a device that flushes f16 denormals: the AMD Vulkan driver here reports no f16 denormal preservation and still keeps the 0x0001 + 0x0001 row, so that row is checked on both GPUs; a device that flushes it to 0 reports the row as unchecked instead of failing (second commit), for the Linux lane's lavapipe.

Overlap: #12084 changes the two template read and write lines next to this PR's assemble change; whichever lands second rebases.

Checklist

  • Based on current main; no other open PR implements the same functions
  • One topic per PR; follow-ups go in a new PR
  • No comments in code except technical debt
  • Unimplemented paths throw (NotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file
  • No notes, investigation .md files or images added to the repository (attach them to this PR)
  • New third-party code is a submodule built from source
  • Generic behaviour, not specific to one title
  • Depends on: none
  • Fixes: none
  • Unblocks: none
  • GPUs tested: NVIDIA GeForce RTX 4070 Ti SUPER, driver 617.42 (32.0.16.1742), Windows 11 Pro 26300; AMD Radeon Graphics (Raphael iGPU, gfx1036), AMD driver 32.0.21045.16010 (Vulkan 2.0.353), Windows 11 Pro 26300; lavapipe (Mesa 26.0.8, LLVM 21.1.8), Ubuntu 26.04.1 under WSL2
  • AI-assisted: yes

🤖 Generated with Claude Code

<!-- greyfinch-sync:boykopovar/AnyPS5:issue:5048967511 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/12348). Originally posted by [vingelvatten](https://github.com/vingelvatten) on 2026-10-28T10:30:14Z. --- ### What `tools/hw-oracle` measures RDNA instructions on a local AMD GPU, but nothing ran the same kernel through the shader recompiler, so a difference between the recompiler and the hardware could only be found by hand (#10771, #10772 and #10922 came from a private harness). - `agc_oracle_runner` (`core/libs/prx/libSceAgcDriver/tools/OracleRunner.cpp`, built with `cmake --build build --target agc_oracle_runner`) takes the HSA code object the oracle assembles from `template.s`, reads the `probe` text and the `probe.kd` kernel descriptor (wave size, LDS, `FLOAT_MODE`, `DX10_CLAMP`, `IEEE`, `FP16_OVFL`, workgroup-id and thread-id enables), refuses every other kernel ABI (scratch, a kernarg size other than 16, user SGPRs other than the kernarg pointer), and dispatches one workgroup through the recompiler on the Vulkan device with the oracle binary's argument convention. The guest block holding the kernarg pair, the rows plus extra bytes and the 16-dword outputs is registered through `GuestAllocations` and passed as a memory region, which the recompiler needs to resolve the kernarg pointer at compile time. - `HW_ORACLE_RUNTIME=vulkan` in `hw_oracle.py` assembles exactly as the `hip` and `hsa` runtimes do and dispatches through the runner named by `HW_ORACLE_VULKAN_RUNNER`; `--json` reports carry a `runtime` field. One body and one set of rows run on the hardware and on the recompiler, and `compare_results.py` lists the differing words. - Tests: `agc_oracle_code_object` (host only) parses a code object built in memory and checks every descriptor rejection names its field; `agc_driver_oracle_runner` dispatches the pinned template text around `v_add_f16 v10, v4, v5` plus a `global_load_dword` of each lane's extra dword over two waves and checks every lane against rows measured on a gfx1036; `test_hw_oracle.py` covers the new runtime without a GPU. - Docs: `HW_ORACLE.md` gains a Recompiler comparison section; the runner's ABI limits are a debt entry in `libSceAgcDriver.md`. First result from the harness, to be reported separately: scalar `v_add_f16`, `v_sub_f16`, `v_mul_f16` and `v_fma_f16` return the canonical NaN on NVIDIA and the other operand's NaN on AMD's Vulkan driver where the hardware returns the first operand's NaN (sign-adjusted for `v_sub_f16`, quieted only with IEEE=1); packed f16, `v_max_f16` and `v_add_f32` match bit for bit. ### Tested Windows 11 Pro 26300, Ryzen 7 7800X3D, WinLibs GCC 15.2.0 r7 UCRT, Release, `BUILD_TESTING=ON`. The branch is rebased onto `main` `ab6f5d32ed` (head `cc920eae69`), with the test registrations moved to `tests/cmake/` by `tools/agc_test_split.py resolve`; the runs below name the base each was made on. On this head the five focused tests with the validation layer pass on both Windows GPUs with no `VUID-` line, `test_hw_oracle.py` runs 68 tests OK (3 skipped) and the conventions check passes; lavapipe was last run on `85bf4de89c`. - `ctest -R "agc_oracle_code_object|agc_driver_oracle_runner"`: both pass on the RTX 4070 Ti SUPER and on the Radeon iGPU (`ANYPS5_REQUIRE_VULKAN=1 ANYPS5_NO_SHADER_CACHE=1`). - `py -3 tools/hw-oracle/test_hw_oracle.py`: 58 tests, OK (3 skipped, as on `main`) at head `85bf4de89c`. - End to end through the CLI: the test body with extra bytes, 64 rows, `--json` on the hardware (`hip`) and through `vulkan` on each GPU; `compare_results.py` reports `Compared 64 rows x 2 registers: 0 differing words` for both. - `py -3 tools/check_conventions.py --base origin/main`: passes. - Validation layer (Vulkan SDK 1.4.363.0): `ctest -V` with `VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation`, `ANYPS5_NO_SHADER_CACHE=1`, `ANYPS5_REQUIRE_VULKAN=1` and `VK_LOADER_DEBUG=layer`, on each GPU, for the compute tests closest to the runner's dispatch path (`agc_driver_exec_host_lanes`, `agc_driver_bda_span_reads`, `agc_driver_bda_anchor_reads`) on `main` `3a40945e62` (the merge base at the time) and on the PR head `da44162ea6`, plus `agc_driver_oracle_runner` and `agc_oracle_code_object` on the head, and the five tests again on the rebased head `85bf4de89c`, and the runner itself through the CLI run above. Every log has `Insert instance layer "VK_LAYER_KHRONOS_validation"` once per device creation, none has `was not found but was requested by env var VK_INSTANCE_LAYERS`, and none has a `VUID-` line, on `main` or on the head, on either GPU. The same comparison was first made against `main` `0cd07dc4ab` before the rebase, with the same result. - Linux (WSL2 Ubuntu 26.04.1, GCC 15.2.0, CMake 4.2.3, Ninja 1.13.2, Python 3.14.4, Mesa 26.0.8 lavapipe, LLVM 21.1.8, clang 21.1.6 and lld 21.1.6 for the oracle's Linux assembly route, validation layer 1.4.341.0), head `da44162ea6`, `BUILD_TESTING=ON` with `ANYPS5_AGC_EXECUTION_TESTS=OracleRunner;ExecHostLanes;BdaSpanReads;BdaAnchorReads`: `agc_oracle_runner` and the `libs` target build; `ctest -V` for the five tests above with `ANYPS5_GPU=llvmpipe`, `ANYPS5_REQUIRE_VULKAN=1`, `ANYPS5_NO_SHADER_CACHE=1`, `VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation` and `VK_LOADER_DEBUG=layer` passes 5 of 5 (`agc_driver_oracle_runner` in 10.3 s; it checks the f16 denormal row there, lavapipe keeps it), with the layer insert line per device creation, no missing-layer line and no `VUID-` line. `test_hw_oracle.py`: 57 tests, OK, 1 skipped (58 at head `85bf4de89c`). The same five tests and the CLI comparison were repeated on the rebased head `85bf4de89c` with the same result. The CLI route with `HW_ORACLE_RUNTIME=vulkan`, `HW_ORACLE_TARGET=gfx1036` and clang+lld assembly on the test body with extra bytes: `Compared 64 rows x 2 registers: 0 differing words` against the gfx1036 hardware report. - Head `d24216ada0` (third commit) replaces the runner's `strtoul` count parsing with `ParseOracleCount`, decimal digits only up to 4294967295, so a negative string can no longer wrap into a valid `threads` or `out_dwords`; `agc_oracle_code_object` covers the wraparound values, signs, blanks, suffixes and overflow for both fields and passes; the built runner rejects `-18446744073709551615` and `-18446744073709551600` with exit 1. - `agc_driver_oracle_runner` on a device that flushes f16 denormals: the AMD Vulkan driver here reports no f16 denormal preservation and still keeps the `0x0001 + 0x0001` row, so that row is checked on both GPUs; a device that flushes it to 0 reports the row as unchecked instead of failing (second commit), for the Linux lane's lavapipe. Overlap: #12084 changes the two template read and write lines next to this PR's `assemble` change; whichever lands second rebases. ### Checklist <!-- Rules behind each item: https://github.com/boykopovar/AnyPS5/blob/main/CONTRIBUTING.md --> - [x] Based on current `main`; no other open PR implements the same functions - [x] One topic per PR; follow-ups go in a new PR - [x] No comments in code except [technical debt](https://github.com/boykopovar/AnyPS5/blob/main/docs/dev/CONVENTIONS.md) - [x] Unimplemented paths throw (`NotImplemented_nid_no_patch`); silent stubs are listed under Silent stubs in their library's [technical debt](https://github.com/boykopovar/AnyPS5/tree/main/docs/dev/debt) file - [x] No notes, investigation `.md` files or images added to the repository (attach them to this PR) - [x] New third-party code is a submodule built from source - [x] Generic behaviour, not specific to one title - [x] Depends on: none - [x] Fixes: none - [x] Unblocks: none - [x] GPUs tested: NVIDIA GeForce RTX 4070 Ti SUPER, driver 617.42 (32.0.16.1742), Windows 11 Pro 26300; AMD Radeon Graphics (Raphael iGPU, gfx1036), AMD driver 32.0.21045.16010 (Vulkan 2.0.353), Windows 11 Pro 26300; lavapipe (Mesa 26.0.8, LLVM 21.1.8), Ubuntu 26.04.1 under WSL2 - [x] AI-assisted: yes 🤖 Generated with [Claude Code](https://claude.com/claude-code)
MarcZX10 commented 2026-10-28 10:34:58 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-28T10:34:58Z.

Review: COMMENTED


I fetched this exact head and ran python3 tools/hw-oracle/test_hw_oracle.py with Python 3.11.2: 56 tests passed, 2 skipped. I also reviewed the parser/dispatch path and the reported two-GPU end-to-end comparisons. One integration follow-up before this can merge: GitHub currently reports DIRTY; git merge-tree against current main shows the only conflict is tools/hw-oracle/hw_oracle.py, where #12326 added explicit UTF-8 arguments to the template reads/writes in the same lines this PR updates for the Vulkan runtime. Please rebase/resolve while preserving both the UTF-8 behavior and the Vulkan paths, then refresh tests on that head. I have not approved while the branch is conflicted.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5681253046 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/12348#pullrequestreview-5681253046). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-28T10:34:58Z. **Review:** COMMENTED --- I fetched this exact head and ran `python3 tools/hw-oracle/test_hw_oracle.py` with Python 3.11.2: **56 tests passed, 2 skipped**. I also reviewed the parser/dispatch path and the reported two-GPU end-to-end comparisons. One integration follow-up before this can merge: GitHub currently reports `DIRTY`; `git merge-tree` against current `main` shows the only conflict is `tools/hw-oracle/hw_oracle.py`, where #12326 added explicit UTF-8 arguments to the template reads/writes in the same lines this PR updates for the Vulkan runtime. Please rebase/resolve while preserving both the UTF-8 behavior and the Vulkan paths, then refresh tests on that head. I have not approved while the branch is conflicted.
MarcZX10 commented 2026-10-28 11:22:02 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-28T11:22:02Z.

Review: COMMENTED


I rechecked the new exact head da44162ea676998268403fc44083e97c105a0278. The updated report now includes the validation-layer comparison against current merge base 3a40945e62 and identifies the earlier 0cd07dc4ab comparison as historical, resolving my freshness comment. I reran python3 tools/hw-oracle/test_hw_oracle.py locally on Python 3.11.2: 44 tests passed, 2 skipped; git diff --check passed. The refreshed hosted Windows and relinker jobs are still running/queued, so I am not approving until they complete.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5681810966 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/12348#pullrequestreview-5681810966). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-28T11:22:02Z. **Review:** COMMENTED --- I rechecked the new exact head `da44162ea676998268403fc44083e97c105a0278`. The updated report now includes the validation-layer comparison against current merge base `3a40945e62` and identifies the earlier `0cd07dc4ab` comparison as historical, resolving my freshness comment. I reran `python3 tools/hw-oracle/test_hw_oracle.py` locally on Python 3.11.2: 44 tests passed, 2 skipped; `git diff --check` passed. The refreshed hosted Windows and relinker jobs are still running/queued, so I am not approving until they complete.
malekaifa commented 2026-10-29 11:07:25 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by malekaifa on 2026-10-29T11:07:25Z.

Review: COMMENTED


I rechecked the current head da44162ea676998268403fc44083e97c105a0278 and the refreshed hosted run. The earlier rebase/freshness points look resolved, and the overall Build run is green, but I don't think the hosted result closes the Linux side yet.

Run 40679114663 has the linux job as skipped. The successful Ubuntu job is configured with -DANYPS5_RELINKER_ONLY=ON, so it does not build or exercise the new AGC oracle runner. That matters here because this PR adds an explicit non-Windows path (std::aligned_alloc, clang/lld assembly, HW_ORACLE_TARGET) and the author noted that the lavapipe path could not be tested locally on the Windows machine.

Could you provide Linux evidence that at least builds the new runner and runs the relevant oracle tests there (ideally the lavapipe agc_driver_oracle_runner path with ANYPS5_REQUIRE_VULKAN=1), or otherwise narrow/document the platform support? I am withholding approval on that coverage gap rather than treating the aggregate green Build status as proof of the Linux path.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5696701634 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/12348#pullrequestreview-5696701634). Originally posted by [malekaifa](https://github.com/malekaifa) on 2026-10-29T11:07:25Z. **Review:** COMMENTED --- I rechecked the current head `da44162ea676998268403fc44083e97c105a0278` and the refreshed hosted run. The earlier rebase/freshness points look resolved, and the overall Build run is green, but I don't think the hosted result closes the Linux side yet. Run `40679114663` has the `linux` job as **skipped**. The successful Ubuntu job is configured with `-DANYPS5_RELINKER_ONLY=ON`, so it does not build or exercise the new AGC oracle runner. That matters here because this PR adds an explicit non-Windows path (`std::aligned_alloc`, clang/lld assembly, `HW_ORACLE_TARGET`) and the author noted that the lavapipe path could not be tested locally on the Windows machine. Could you provide Linux evidence that at least builds the new runner and runs the relevant oracle tests there (ideally the lavapipe `agc_driver_oracle_runner` path with `ANYPS5_REQUIRE_VULKAN=1`), or otherwise narrow/document the platform support? I am withholding approval on that coverage gap rather than treating the aggregate green Build status as proof of the Linux path.
MarcZX10 commented 2026-10-30 06:33:02 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-30T06:33:02Z.

Review: COMMENTED


Re-checked — new head, pending checks

The new head resolves the prior debt-document conflict and adds a capability-aware f16 denormal check; focused Python tests pass, while hosted build and relinker jobs are still queued.

What I ran

  • Exact PR head: 85bf4de89cbcee5c52f8055a19b5350bc7939275; recorded base: 47cdccde40bca36c1203ec498d9ff47f23bc6537.
  • Current main: 47cdccde40bca36c1203ec498d9ff47f23bc6537; merge preview tree: a7624c1d8e96638f661fdb28b7f2d555a32077e9 (clean).
  • Environment: Linux x86_64, Git 2.39.5, Python 3.11. No compiler or GPU was used locally.
  • I extracted tools/hw-oracle from the exact PR ref into a temporary directory and ran the Python suite there. Commands/checks:
git merge-tree --write-tree refs/remotes/upstream/main refs/pr/12348
git diff --check refs/remotes/upstream/main...refs/pr/12348
python3 tools/check_conventions.py --base refs/remotes/upstream/main --head refs/pr/12348
python3 tools/check_main_sync.py --base refs/remotes/upstream/main --head refs/pr/12348
python3 tools/hw-oracle/test_hw_oracle.py
gh pr checks 12348 --repo boykopovar/AnyPS5

Results

Check Result
Merge preview Clean; tree a7624c1d8e96638f661fdb28b7f2d555a32077e9.
Diff check Passed with no output.
Conventions Passed.
Main sync 2 commits ahead and 2 behind; merge is clean. The main-only paths are tools/sanitizer_report.py and its test, outside this PR's changed paths.
Python hardware-oracle tests 58 passed, 2 skipped.
Hosted checks on this head Report and eligibility pass; Linux and specialized device jobs are skipped; Windows and the relinker, ASan, conventions, and labels jobs are still pending.
Author-reported GPU tests The author reports the five focused tests passing with validation enabled on RTX 4070 Ti SUPER, Radeon iGPU, and lavapipe, with no VUID output; this is not independently reproduced here.
Unedited check output
a7624c1d8e96638f661fdb28b7f2d555a32077e9
All conventions checks passed.
refs/pr/12348 is 2 ahead and 2 behind refs/remotes/upstream/main (merge base 3b32cc7b6)
merge: clean
s..........s..............................................
----------------------------------------------------------------------
Ran 58 tests in 1.102s

OK (skipped=2)
linux	skipping	0	https://github.com/boykopovar/AnyPS5/actions/runs/41014203075/job/123927555183
register-context	skipping	0	https://github.com/boykopovar/AnyPS5/actions/runs/41014203075/job/123927555745
write-watch	skipping	0	https://github.com/boykopovar/AnyPS5/actions/runs/41014203075/job/123927555616
labels	pending	0	https://github.com/boykopovar/AnyPS5/actions/runs/41014353450/job/123927551925
relinker-asan	pending	0	https://github.com/boykopovar/AnyPS5/actions/runs/41014203075/job/123927554298
windows	pending	0	https://github.com/boykopovar/AnyPS5/actions/runs/41014203075/job/123927554175
report	pass	31s	https://github.com/boykopovar/AnyPS5/actions/runs/41014203121/job/123926703758
relinker (macos-latest, clang++)	pending	0	https://github.com/boykopovar/AnyPS5/actions/runs/41014203075/job/123927554235
relinker (macos-latest, clang++, x86_64)	pending	0	https://github.com/boykopovar/AnyPS5/actions/runs/41014203075/job/123927554321
relinker (ubuntu-latest, g++)	pending	0	https://github.com/boykopovar/AnyPS5/actions/runs/41014203075/job/123927554312
relinker (windows-latest, g++)	pending	0	https://github.com/boykopovar/AnyPS5/actions/runs/41014203075/job/123927554237
eligibility	pass	4s	https://github.com/boykopovar/AnyPS5/actions/runs/41014203075/job/123926703975
conventions	pending	0	https://github.com/boykopovar/AnyPS5/actions/runs/41014353597/job/123927189227

Sources

Not verified

I did not compile the C++ runner, run CTest, or run GPU tests locally. Hosted Windows and relinker jobs remain pending; the author's three-device results are reported, not independently reproduced.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5708842707 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/12348#pullrequestreview-5708842707). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-30T06:33:02Z. **Review:** COMMENTED --- # Re-checked — new head, pending checks The new head resolves the prior debt-document conflict and adds a capability-aware f16 denormal check; focused Python tests pass, while hosted build and relinker jobs are still queued. ## What I ran - Exact PR head: `85bf4de89cbcee5c52f8055a19b5350bc7939275`; recorded base: `47cdccde40bca36c1203ec498d9ff47f23bc6537`. - Current `main`: `47cdccde40bca36c1203ec498d9ff47f23bc6537`; merge preview tree: `a7624c1d8e96638f661fdb28b7f2d555a32077e9` (clean). - Environment: Linux x86_64, Git 2.39.5, Python 3.11. No compiler or GPU was used locally. - I extracted `tools/hw-oracle` from the exact PR ref into a temporary directory and ran the Python suite there. Commands/checks: ```sh git merge-tree --write-tree refs/remotes/upstream/main refs/pr/12348 git diff --check refs/remotes/upstream/main...refs/pr/12348 python3 tools/check_conventions.py --base refs/remotes/upstream/main --head refs/pr/12348 python3 tools/check_main_sync.py --base refs/remotes/upstream/main --head refs/pr/12348 python3 tools/hw-oracle/test_hw_oracle.py gh pr checks 12348 --repo boykopovar/AnyPS5 ``` ## Results | Check | Result | |---|---| | Merge preview | Clean; tree `a7624c1d8e96638f661fdb28b7f2d555a32077e9`. | | Diff check | Passed with no output. | | Conventions | Passed. | | Main sync | 2 commits ahead and 2 behind; merge is clean. The main-only paths are `tools/sanitizer_report.py` and its test, outside this PR's changed paths. | | Python hardware-oracle tests | 58 passed, 2 skipped. | | Hosted checks on this head | Report and eligibility pass; Linux and specialized device jobs are skipped; Windows and the relinker, ASan, conventions, and labels jobs are still pending. | | Author-reported GPU tests | The author reports the five focused tests passing with validation enabled on RTX 4070 Ti SUPER, Radeon iGPU, and lavapipe, with no VUID output; this is not independently reproduced here. | <details> <summary>Unedited check output</summary> ```text a7624c1d8e96638f661fdb28b7f2d555a32077e9 All conventions checks passed. refs/pr/12348 is 2 ahead and 2 behind refs/remotes/upstream/main (merge base 3b32cc7b6) merge: clean s..........s.............................................. ---------------------------------------------------------------------- Ran 58 tests in 1.102s OK (skipped=2) linux skipping 0 https://github.com/boykopovar/AnyPS5/actions/runs/41014203075/job/123927555183 register-context skipping 0 https://github.com/boykopovar/AnyPS5/actions/runs/41014203075/job/123927555745 write-watch skipping 0 https://github.com/boykopovar/AnyPS5/actions/runs/41014203075/job/123927555616 labels pending 0 https://github.com/boykopovar/AnyPS5/actions/runs/41014353450/job/123927551925 relinker-asan pending 0 https://github.com/boykopovar/AnyPS5/actions/runs/41014203075/job/123927554298 windows pending 0 https://github.com/boykopovar/AnyPS5/actions/runs/41014203075/job/123927554175 report pass 31s https://github.com/boykopovar/AnyPS5/actions/runs/41014203121/job/123926703758 relinker (macos-latest, clang++) pending 0 https://github.com/boykopovar/AnyPS5/actions/runs/41014203075/job/123927554235 relinker (macos-latest, clang++, x86_64) pending 0 https://github.com/boykopovar/AnyPS5/actions/runs/41014203075/job/123927554321 relinker (ubuntu-latest, g++) pending 0 https://github.com/boykopovar/AnyPS5/actions/runs/41014203075/job/123927554312 relinker (windows-latest, g++) pending 0 https://github.com/boykopovar/AnyPS5/actions/runs/41014203075/job/123927554237 eligibility pass 4s https://github.com/boykopovar/AnyPS5/actions/runs/41014203075/job/123926703975 conventions pending 0 https://github.com/boykopovar/AnyPS5/actions/runs/41014353597/job/123927189227 ``` </details> ## Sources - [Denormal capability handling at head `85bf4de89cbcee5c52f8055a19b5350bc7939275`](https://github.com/boykopovar/AnyPS5/blob/85bf4de89cbcee5c52f8055a19b5350bc7939275/core/libs/prx/libSceAgcDriver/tests/execution/OracleRunner.cpp#L26-L40) - [Author's focused GPU results for the same head](https://github.com/boykopovar/AnyPS5/pull/12348#issuecomment-6516531844) ## Not verified I did not compile the C++ runner, run CTest, or run GPU tests locally. Hosted Windows and relinker jobs remain pending; the author's three-device results are reported, not independently reproduced.
MarcZX10 commented 2026-10-30 07:13:44 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-30T07:13:44Z.

Review: APPROVED


Reviewed — looks good

I reviewed exact head 85bf4de89cbcee5c52f8055a19b5350bc7939275; the earlier debt conflict is resolved, the current-base comparison found no intervening changes to this PR's touched paths, and I found no remaining blocker. The Python hardware-oracle suite passed locally on this exact head earlier today (58 passed, 2 skipped); hosted Windows, Ubuntu/Windows relinker, ASan, conventions, labels, report, and eligibility checks pass. The two macOS relinker jobs remain pending and Linux product CI is skipped; the author reports the focused Vulkan tests and oracle comparisons on the RTX 4070 Ti SUPER, Radeon iGPU, and lavapipe (report). I did not locally compile the C++ runner or independently reproduce the GPU tests.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5709170702 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/12348#pullrequestreview-5709170702). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-30T07:13:44Z. **Review:** APPROVED --- # Reviewed — looks good I reviewed exact head `85bf4de89cbcee5c52f8055a19b5350bc7939275`; the earlier debt conflict is resolved, the current-base comparison found no intervening changes to this PR's touched paths, and I found no remaining blocker. The Python hardware-oracle suite passed locally on this exact head earlier today (58 passed, 2 skipped); hosted Windows, Ubuntu/Windows relinker, ASan, conventions, labels, report, and eligibility checks pass. The two macOS relinker jobs remain pending and Linux product CI is skipped; the author reports the focused Vulkan tests and oracle comparisons on the RTX 4070 Ti SUPER, Radeon iGPU, and lavapipe ([report](https://github.com/boykopovar/AnyPS5/pull/12348#issuecomment-6516531844)). I did not locally compile the C++ runner or independently reproduce the GPU tests.
malekaifa commented 2026-10-30 10:09:21 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by malekaifa on 2026-10-30T10:09:21Z.

Review: APPROVED


Re-reviewed exact head 85bf4de89cbcee5c52f8055a19b5350bc7939275 after the conflict resolution and refreshed GPU evidence. The earlier Linux/lavapipe and NVIDIA attribution concerns are resolved, and the debt-doc conflict is gone. On this exact head I ran tools/hw-oracle/test_hw_oracle.py on Windows Python 3.12: 58 tests OK (4 platform skips); git diff --check is clean. Git merge-tree is clean against current main a5939f10a8 and also clean pairwise with Malek's live hw-oracle PRs #12812, #12816 and #12821, so this does not create a hidden integration conflict for those changes. Hosted Build is fully green on this head: Windows, Ubuntu/Windows relinker, both macOS relinker lanes, ASan and eligibility all pass; Linux product CI is skipped. I found no remaining blocking issue.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5710796735 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/12348#pullrequestreview-5710796735). Originally posted by [malekaifa](https://github.com/malekaifa) on 2026-10-30T10:09:21Z. **Review:** APPROVED --- Re-reviewed exact head 85bf4de89cbcee5c52f8055a19b5350bc7939275 after the conflict resolution and refreshed GPU evidence. The earlier Linux/lavapipe and NVIDIA attribution concerns are resolved, and the debt-doc conflict is gone. On this exact head I ran tools/hw-oracle/test_hw_oracle.py on Windows Python 3.12: 58 tests OK (4 platform skips); git diff --check is clean. Git merge-tree is clean against current main a5939f10a85fdbcd3e0fe75e5eea278f4fe3e52a and also clean pairwise with Malek's live hw-oracle PRs #12812, #12816 and #12821, so this does not create a hidden integration conflict for those changes. Hosted Build is fully green on this head: Windows, Ubuntu/Windows relinker, both macOS relinker lanes, ASan and eligibility all pass; Linux product CI is skipped. I found no remaining blocking issue.
malekaifa commented 2026-10-30 10:11:48 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by malekaifa on 2026-10-30T10:11:48Z.

Review: APPROVED


Re-reviewed exact head 85bf4de89cbcee5c52f8055a19b5350bc7939275 after the Linux/lavapipe and debt-doc follow-ups. I independently fetched that exact SHA (not the stale pre-rebase PR ref), verified a clean merge-tree against current main a5939f10a8, clean git diff --check, passing conventions, and tools/hw-oracle/test_hw_oracle.py on Windows Python 3.12: 58 tests OK with 4 expected platform skips. Hosted Build and Progress report are green on this head. The author has also supplied focused validation-layer runs on RTX 4070 Ti SUPER, Radeon iGPU, and lavapipe/WSL, plus the base/head attribution checks that resolved the two NVIDIA signals I raised earlier. I found no remaining blocker in the hw-oracle/Vulkan integration.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5710820444 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/12348#pullrequestreview-5710820444). Originally posted by [malekaifa](https://github.com/malekaifa) on 2026-10-30T10:11:48Z. **Review:** APPROVED --- Re-reviewed exact head 85bf4de89cbcee5c52f8055a19b5350bc7939275 after the Linux/lavapipe and debt-doc follow-ups. I independently fetched that exact SHA (not the stale pre-rebase PR ref), verified a clean merge-tree against current main a5939f10a85fdbcd3e0fe75e5eea278f4fe3e52a, clean git diff --check, passing conventions, and tools/hw-oracle/test_hw_oracle.py on Windows Python 3.12: 58 tests OK with 4 expected platform skips. Hosted Build and Progress report are green on this head. The author has also supplied focused validation-layer runs on RTX 4070 Ti SUPER, Radeon iGPU, and lavapipe/WSL, plus the base/head attribution checks that resolved the two NVIDIA signals I raised earlier. I found no remaining blocker in the hw-oracle/Vulkan integration.
malekaifa commented 2026-10-30 18:03:54 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by malekaifa on 2026-10-30T18:03:54Z.

Review: CHANGES_REQUESTED


Blocking oracle-facing issue on exact head 85bf4de89cbcee5c52f8055a19b5350bc7939275: agc_oracle_runner's ParseCount() uses strtoul() without rejecting a leading minus sign.

On 64-bit libc, unsigned conversion can wrap specially chosen negative decimal strings into valid small values with no parse error. For example, -18446744073709551615 can become 1, and -18446744073709551600 can become 16. That means malformed negative threads / out_dwords arguments can bypass the CLI validation and reach RunOracleKernel() instead of being rejected.

Please reject a leading - before the unsigned conversion (or use an equivalent strict unsigned parser) and add regression cases for both fields using those wraparound values, while keeping the existing valid boundaries unchanged. This is the same defect class just caught in the HSA runner, so keeping the Vulkan runner aligned matters for the shared oracle CLI contract.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5716561645 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/12348#pullrequestreview-5716561645). Originally posted by [malekaifa](https://github.com/malekaifa) on 2026-10-30T18:03:54Z. **Review:** CHANGES_REQUESTED --- Blocking oracle-facing issue on exact head `85bf4de89cbcee5c52f8055a19b5350bc7939275`: `agc_oracle_runner`'s `ParseCount()` uses `strtoul()` without rejecting a leading minus sign. On 64-bit libc, unsigned conversion can wrap specially chosen negative decimal strings into valid small values with no parse error. For example, `-18446744073709551615` can become `1`, and `-18446744073709551600` can become `16`. That means malformed negative `threads` / `out_dwords` arguments can bypass the CLI validation and reach `RunOracleKernel()` instead of being rejected. Please reject a leading `-` before the unsigned conversion (or use an equivalent strict unsigned parser) and add regression cases for both fields using those wraparound values, while keeping the existing valid boundaries unchanged. This is the same defect class just caught in the HSA runner, so keeping the Vulkan runner aligned matters for the shared oracle CLI contract.
malekaifa commented 2026-10-31 00:43:44 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by malekaifa on 2026-10-31T00:43:44Z.

Review: APPROVED


Re-reviewed exact current head d24216ada0b90062fb8ff20891a4964f7e0ad8d0 after the Vulkan-runner count-parser fix. ParseOracleCount is now a strict decimal parser: every character must be 0-9, accumulation uses uint64_t, and values above UINT32_MAX are rejected before narrowing. That closes the negative-wraparound defect I requested changes for, along with signs, whitespace, suffixes and hex-like inputs. The host regression covers both hreads and out_dwords with the two wraparound negatives plus -1/-0/+1/empty/whitespace/suffix/overflow cases, while keeping 0/1/16/1024/007/4294967295 accepted. Exact-head merge-tree against current main e49d43d625 is clean and git diff --check passes. Hosted conventions, eligibility, portability, Windows, Ubuntu/Windows relinker, ASan and report are green; only the generic macOS relinker lanes are queued. The refreshed NVIDIA run on this head reports 2,395 passed, 0 new failures, and no new Vulkan validation IDs versus main. My previous parser blocker is resolved; no remaining blocking issue found.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5720176805 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/12348#pullrequestreview-5720176805). Originally posted by [malekaifa](https://github.com/malekaifa) on 2026-10-31T00:43:44Z. **Review:** APPROVED --- Re-reviewed exact current head d24216ada0b90062fb8ff20891a4964f7e0ad8d0 after the Vulkan-runner count-parser fix. ParseOracleCount is now a strict decimal parser: every character must be 0-9, accumulation uses uint64_t, and values above UINT32_MAX are rejected before narrowing. That closes the negative-wraparound defect I requested changes for, along with signs, whitespace, suffixes and hex-like inputs. The host regression covers both hreads and out_dwords with the two wraparound negatives plus -1/-0/+1/empty/whitespace/suffix/overflow cases, while keeping 0/1/16/1024/007/4294967295 accepted. Exact-head merge-tree against current main e49d43d6256b7c2283539d86b42325a36653275a is clean and git diff --check passes. Hosted conventions, eligibility, portability, Windows, Ubuntu/Windows relinker, ASan and report are green; only the generic macOS relinker lanes are queued. The refreshed NVIDIA run on this head reports 2,395 passed, 0 new failures, and no new Vulkan validation IDs versus main. My previous parser blocker is resolved; no remaining blocking issue found.
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
boykopovar/AnyPS5!12348
No description provided.