test(shader): pin the f16 output modifier against the FP16_OVFL clamp as measured on gfx1151 #27972
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/27972"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from boykopovar/AnyPS5. Originally posted by Jirka135 on 2026-11-27T23:42:10Z.
What
Extends
Fp16OverflowOmod(agc_driver_fp16_overflow_omod) fromv_mul_f16tov_mul_f16,v_add_f16andv_fma_f16. Each instruction runs withmul:2,div:2and with no modifier, andv_mul_f16also withmul:4.The test uses 16 rows and their negations in lanes 16..31:
div:2shows whether theFP16_OVFLclamp comes first (0x77ff) or last (0x7bff)It runs in four float modes:
FP16_OVFL0FP16_OVFL1FP16_OVFL1 with f16 denormals kept, where the modifier is ignoredFP16_OVFL1 with IEEE mode on, where the modifier is ignoredThe expected values are the hardware results, and they match the current translation: clamp to ±0x7bff first, then the modifier. The
FP16_OVFLdebt entry now records this ordering. On a mismatch the test prints the measured rows in the layout ofModes, ready to paste.Tested
tools/hw-oracle/hw_oracle.pyover HIP on gfx1151 in the four modes. gfx1151 rejects the true16.loperands, so the HIP body uses the fake16 encodings. WithFP16_OVFL=1,div:2of a product that overflows gives0x77ff, so the clamp comes first. All 4 × 16 rows × 10 outputs equalModesin the test.agc_oracle_runner(Vulkan 1.4.329 on the same GPU,HW_ORACLE_TARGET=gfx1030for the test's GFX10 encodings) on the same rows and modes: identical to the hardware.ctest -R ^agc_driver_fp16_overflow_omod$ -V: passed.python tools/check_conventions.pypassed with one warning: the debt entry is over 1000 characters. It was already over the limit; this change adds one sentence.python tools/debt_fold.py --checkreports nothing for this fragment.Checklist
docs/dev/debt/changes/🤖 Generated with Claude Code
Summary by CodeRabbit
Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-28T11:08:15Z.
Review: COMMENTED
Reviewed — no blocking findings
Nothing in the inspected changes shows a verified defect; the reported test results were supplied by the author and were not run in this review.
What I ran
Reviewed head
42cbebae4798f8191275bd92ee1f905ae0b541ea. No commands or tests were run; the reader interface provided source access only.Results
Findings
Blocking
None.
Non-blocking
None.
Not verified
Hardware measurements, the recompiler oracle run, the CTest result, and convention/debt-fold checks were not independently verified. No other repository files were read; the manifest lists both changed files as included and reviewed.
To get this to a good state
Nothing is required.
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.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.