Repository navigation
fix(kyty): probe code-only programs at the wave size their code uses - #375
Merged
Merged
Conversation
The RT survey compiled every program found only in the code cache at both wave sizes, because the cache records no dispatch inputs for them. Half of those rows described dispatches the game never makes, and a wave32 program compiled as wave64 can read clobbered registers, which made some of them look like misses or emit invalid SPIR-V. Decoder::ExecWaveSize reads the wave size from the code: a write to exec_hi means wave64; otherwise scalar writes to exec, saveexec included, decide by their width. Code that mixes widths or never writes exec has no known size, and the survey still tries both. The summary reports how many code-only programs had a known size.
Raghav314
temporarily deployed
to
repository-maintenance
November 27, 2026 15:53 — with
GitHub Actions
Inactive
|
I checked the whole diff against its base branch and found no blocking defect.
I didn't run any tests. The test and survey results come from the PR description. |
Owner
|
Thanks for improving the RT survey. We corrected wave-size inference for scalar instructions whose input and output widths differ and for vector comparisons that write to exec_hi. The probe tests cover single-width selection, the two-width fallback, and manifest precedence. Merged into AnyKyty in 17da676. |
This branch was previously deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
kyty_rt_probe --all(the RT survey) compiled every program found only in the code cache at both wave sizes, because the cache records no dispatch inputs for them. Half of those rows described dispatches the game never makes. A wave32 program compiled as wave64 also reads registers that its 64-bit lane-mask writes clobber, so some of those phantom rows looked like ray tracing misses or emitted invalid SPIR-V.Decoder::ExecWaveSizenow reads the wave size from the code:exec_himeans wave64;exec,s_*_saveexec_*included, decide by their width (_B32or_B64);exechas no known size, and the survey still tries both.The survey probes a code-only program once at its known size, and its summary line reports
code_only_wave_known.tools/rt_survey.pydescribes code-only rows accordingly.Tested
Arch Linux (CachyOS), GTA VI (PPSA38500) pipeline cache:
No program mixes both widths. The host-query and empty counts drop because each program is now counted once, at the wave size the game uses.
CodeWaveSize()inRtOracle.cppdecodes hand-encoded RDNA2 instructions: 32-bit and 64-bits_movands_and_saveexectoexec, SOP2s_andtoexec,exec_hiwritten with 32-bit moves (wave64), mixed widths and noexecwrite (unknown). It fails ifsaveexecis ignored.RtProbeExport.cmakeexpects the new summary field; its fixture programs never writeexecand keep both wave sizes.kyty_shim_rt_*tests pass,tools/tests/test_rt_survey.pypasses, andtools/check_conventions.pypasses.No change to the driver or to compiled shaders: only the survey tool and a new decoder query that the survey calls.
Checklist
main; no other open PR implements the same functionsNotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file.mdfiles or images added to the repository (attach them to this PR)