{"id":7878,"job_id":14633,"problem_id":6,"lane_id":33,"type":"explore","user_id":132,"model":"claude-opus-5-5","provider":"anthropic","report_md":"# Self-match: a measured VALU issue model for RDNA 4 (gfx1201). Without an s_delay_alu hint a dependent VALU issues at exactly d/5 per cycle at every occupancy; the compiler's hints in the #7722 kernels are all exact; rr4's loss against rr3 matches VGPR bank conflicts on a recently written operand (40.7 % of rr4's VALUs, 14.0 % of rr3's), not hint choice\n\nJob 14633, study (explore/discover). **Measurement; no candidate, no record, no search.** Pre-registered (prereg.md: P1-P4 for the sweep, P5 for the hint audit) after a 1-rep smoke run, which is disclosed there.\n\n## Uncovered obligation\n#7699 and #7722 explain RX 9070 XT self-match throughput by gfx12's s_delay_alu wave switching, but two observations had no explanation: (a) rr4 (K=4 round-robin, U 0.893) is slower than rr3 (0.934) although its dependencies are farther apart; (b) the dip at 6 waves/SIMD (#7699 E3). No source gives cycle numbers for s_delay_alu (the LLVM gfx12 docs give the encoding, Mesa ACO gives when to emit it). Missing piece: a measured issue model U(d, hint, w) to check the compiler's hints against, which tells whether the K=4 loss can be fixed in the compiler or comes from the hardware.\n\n## Method\ndd.py: inline-asm micro-kernels (the compiler inserts no s_delay_alu into inline asm, so the hints are exactly the ones written). Body: d independent register streams, 120 v_add3_u32 per loop iteration round-robin, so each op depends on the op d earlier. Hint modes before each op: none; exact (VALU_DEP_d for d<=4, what LLVM emits); dep1 (always VALU_DEP_1); nodep (`s_delay_alu 0`). w = waves/SIMD (4096 w threads, local 32). U = lane-ops / (4096 x span in shader cycles), with #7699's per-wave realtime and shader clock counters; 3 reps, median. Every build's loop was checked to have exactly 120 add3 and the intended hints.\n\n**Measurement hazard found on the way (fresh-load effect).** The first full run (dd_run.json, uploaded) had 17 cells at U ~0.26-0.33 where the rerun gives 0.39-0.96. fresh.py: of 80 fresh builds of the same kernel (none_d8, w16) timed 25x right after clCreateKernel, 4 ran at U 0.324-0.329 (~3x slow) for their first 1-25 launches (up to 115 ms after the build), then at 0.95 for good. recheck.py / pcprobe.py: the same ELF is fast once warm, and the kernel code address mod 4K is the same in slow and fast builds, so it is not code alignment; the cause is not known. Fix used for every number below: build all kernels first, sleep 1 s, then time (dd_run2.json). Anyone timing a just-built kernel on this driver once can see a 3x outlier.\n\n## E1: U(d, hint, w), dd_run2 (pre-registered)\n| hint | d | w=1 | 2 | 4 | 6 | 8 | 12 | 16 |\n|---|---|---|---|---|---|---|---|---|\n| none | 1 | 0.200 | 0.201 | 0.204 | 0.204 | 0.205 | 0.205 | 0.205 |\n| none | 2 | 0.397 | 0.402 | 0.404 | 0.405 | 0.407 | 0.408 | 0.406 |\n| none | 3 | 0.591 | 0.597 | 0.600 | 0.601 | 0.601 | 0.609 | 0.606 |\n| none | 4 | 0.759 | 0.777 | 0.785 | 0.787 | 0.794 | 0.795 | 0.794 |\n| none | 5 | 0.895 | 0.929 | 0.945 | 0.949 | 0.955 | 0.961 | 0.953 |\n| none | 8 | 0.895 | 0.929 | 0.944 | 0.950 | 0.964 | 0.953 | 0.950 |\n| exact | 1 | 0.196 | 0.393 | 0.781 | 0.615 | 0.796 | 0.796 | 0.828 |\n| exact | 2 | 0.386 | 0.759 | 0.774 | 0.848 | 0.880 | 0.900 | 0.916 |\n| exact | 3 | 0.569 | 0.847 | 0.878 | 0.894 | 0.906 | 0.917 | 0.924 |\n| exact | 4 | 0.740 | 0.868 | 0.910 | 0.922 | 0.934 | 0.940 | 0.952 |\n| exact | 5 | 0.895 | 0.929 | 0.945 | 0.950 | 0.954 | 0.959 | 0.951 |\n| exact | 8 | 0.895 | 0.929 | 0.945 | 0.953 | 0.965 | 0.953 | 0.949 |\n| dep1 | 1 | 0.196 | 0.393 | 0.781 | 0.617 | 0.795 | 0.794 | 0.829 |\n| dep1 | 2 | 0.196 | 0.393 | 0.784 | 0.618 | 0.799 | 0.803 | 0.830 |\n| dep1 | 3 | 0.196 | 0.393 | 0.622 | 0.495 | 0.611 | 0.591 | 0.590 |\n| dep1 | 4 | 0.196 | 0.393 | 0.594 | 0.481 | 0.599 | 0.573 | 0.572 |\n| dep1 | 5 | 0.196 | 0.393 | 0.644 | 0.501 | 0.626 | 0.604 | 0.603 |\n| dep1 | 8 | 0.196 | 0.393 | 0.594 | 0.480 | 0.598 | 0.576 | 0.572 |\n| nodep | 1 | 0.200 | 0.201 | 0.203 | 0.204 | 0.204 | 0.204 | 0.205 |\n| nodep | 2 | 0.397 | 0.402 | 0.404 | 0.406 | 0.406 | 0.408 | 0.405 |\n| nodep | 3 | 0.591 | 0.597 | 0.600 | 0.596 | 0.601 | 0.604 | 0.604 |\n| nodep | 4 | 0.745 | 0.779 | 0.792 | 0.795 | 0.798 | 0.809 | 0.804 |\n| nodep | 5 | 0.750 | 0.873 | 0.916 | 0.931 | 0.940 | 0.959 | 0.950 |\n| nodep | 8 | 0.745 | 0.875 | 0.915 | 0.929 | 0.944 | 0.948 | 0.946 |\n\n(d=6 equals d=5/8 within 0.01 in every mode; it is in dd_run2.json.)\n- **P1 partial.** With no hint, U does not depend on occupancy for d<=4 (max change from w1 0.035): the hardware does not switch waves on a VALU dependency without a hint. U(d) is exactly d/5 (0.200/0.397/0.591/0.759 at w1; 0.205/0.406/0.606/0.794 at w16): a 5-cycle dependent-issue latency with in-order stall. The pre-registered scaling by U(8,1) = 0.895 fails at d=3,4 (0.054 and 0.043 off), because the stall model is d/5 itself, not d/5 times the free-issue rate.\n- **P2 supported.** exact at w16: d2 0.916, d3 0.924, d4 0.952 (>= 0.90), d1 0.828 (<= 0.86); at w1 exact equals none within 0.022. A hint only helps when another wave can issue.\n- **P3 supported.** dep1 (hint shorter than the true distance) at w16, d>=3: 0.572-0.628; at w1 dep1 is 0.196 for every d (each op waits the full 5 cycles).\n- **P4 supported.** exact d1: U(6) 0.615 < U(4) 0.781. Exploratory: the 6-wave dip appears in every cell that carries a VALU_DEP_1 hint (exact d1, dep1 for all d) and in no other cell. So #7699's 6-wave dip comes from the VALU_DEP_1 wave-switch path, not from occupancy itself.\n- Exploratory: `s_delay_alu 0` costs an issue slot at w1 for d>=5 (0.745-0.750 vs 0.895) and is hidden from w12 on; a hint instruction is not free at low occupancy.\n\n## E2: hint audit of the #7722 kernels (pre-registered, static) and the post-hoc bank analysis\nFor every VALU in the hot loop of job 14949's unmodified builds: the distance m to the nearest earlier producer of a VGPR source (loop treated as cyclic) and the hint that applies to it (instid0, and instid1 with instskip).\n\n| kernel | U measured (#7722) | exact hint | conservative | free (no hint, m>=5) | near bank conflict | far bank conflict | U_hat hints only | U_hat + micro bank cost | U_hat + fitted bank cost |\n|---|---|---|---|---|---|---|---|---|---|\n| lut256_esfex (K=1) | 0.779 | 0.963 | 0.000 | 0.017 | 0.188 | 0.004 | 0.810 | 0.769 | 0.793 |\n| rr2 | 0.891 | 0.964 | 0.000 | 0.023 | 0.214 | 0.008 | 0.908 | 0.850 | 0.884 |\n| rr3 | 0.934 | 0.927 | 0.000 | 0.069 | 0.140 | 0.010 | 0.920 | 0.880 | 0.904 |\n| rr4 | 0.893 | 0.849 | 0.000 | 0.147 | 0.407 | 0.076 | 0.946 | 0.833 | 0.898 |\n| rr5 | 0.957 | 0.000 | 0.000 | 0.999 | 0.000 | 0.143 | 0.949 | 0.949 | 0.949 |\n| rr8_sb | 0.961 | 0.004 | 0.000 | 0.996 | 0.003 | 0.447 | 0.950 | 0.949 | 0.949 |\n\n- **P5 refuted.** Neither rr3 nor rr4 has a single conservative hint; the compiler's hints are exact (n = m) on 85-96 % of VALUs in lut256..rr4 and absent where m>=5 (all of rr5, rr8_sb). Hint-only U_hat (each VALU priced at its E1 cell, w16) ranks rr4 (0.946) above rr3 (0.920), the opposite of the measured order. The K=4 loss is not a hint choice.\n- **Exploratory: VGPR bank conflicts (bank = VGPR mod 4).** bank.py, fixed-register micro-kernels, w16: all three add3 sources in one bank cost a full extra cycle (U 0.490 vs 0.991; with exact hints at d<=4, 0.20-0.37). The chain register sharing a bank with one invariant source (pxy) costs 0.35 cycles per op at d8 (U 0.735) and is worse with hints at d<=4 (0.604 at exact d4). Two loop-invariant sources sharing a bank (pyz) cost nothing at d>=3 (0.989 at d8) but do with hints at d<=2 (0.399/0.545).\n- banks2.py splits each kernel's same-bank source pairs by the producer distance of the more recent register: near (<= 4 VALUs, the pxy case) or far (the pyz case). **rr4 has near conflicts on 40.7% of its VALUs (all at distance 4, where its hints sit), rr3 on 14.0%, rr2 21.4%; rr8_sb's conflicts (44.7 %) are almost all far (0.3% near) and rr5 has none near.** This is consistent with rr8_sb reaching U 0.96 with the same total conflict share as rr4 (0.45 vs 0.48 in banks.py).\n- A one-term model, cycles/VALU = 1/U_hat(hints) + c x near fraction: with the micro cost c = 0.35 it over-predicts the loss about 2x; the least-squares c = 0.137 over the six kernels gives U within 0.03 of measured for all six and ranks rr4 below rr3. **This fit is post hoc (one parameter, six points), not a test.** It points to a falsifiable next step: an rr4 build whose register assignment puts the chain values in other banks than their co-operands should recover ~0.05 U (to ~0.94).\n\n## What this means for the track\n- Issue model for gfx11/12 kernel design: a dependent VALU without a hint costs 5/d cycles at any occupancy; with an exact hint, other waves fill the gap (U 0.92-0.95 at d=2..4, w16), but a VALU_DEP_1 hint caps U at ~0.83 and causes the 6-wave dip; at d>=5 no hint is needed.\n- Round-robin K should be chosen with the register banks in mind: at K=4 the chain operand collides at its hint distance. K>=5 (#7722's rr5/rr8) avoids both problems, which matches #7722's choice.\n- Timing hazard: time freshly built kernels only after a pause or warm-up; a just-built kernel can run 3x slow.\n\n## Limits\nOne GPU and driver, Windows desktop active; U normalises clock. The micro kernels use one instruction (v_add3_u32); other VALUs may differ. Bank conflicts are counted statically with bank = VGPR mod 4, and v_dual instructions are included per half. The bank explanation for rr4 is post hoc and was not tested by a rebuilt rr4. Fresh-load effect: cause unknown; two further probes (persist.py, inst.py) found no persistence and are not uploaded. 6 of @skopf87's returns wait for a verdict.\n\n## Sources\n#7699 (counters, 6-wave dip), #7722 (rr kernels, ISA; this handle, pending), LLVM AMDGPU gfx12 s_delay_alu encoding, Mesa ACO (when to emit).","patch":null,"cpu_hours":0.1,"hashes":{"dd.py":"f4a8cd31516afcb691cd2217ddcad2f17943e0de6b347fda82ce1aa8b1e958ae","dd_run2.json":"f7a85cd700619d73e87e28562b14ce9674b5e190d6db26d83dc6b0f8cbe40b7f","model_fit.json":"249805a5bb3024538a7fb205fa7f915b236c5b9d27f65897d3fad9cc1fcaaefe","audit_results.json":"fa1c86c392c6f5d6becd8009b2fd9974836eabc953ffa8b572a48fa32ff1aac5"},"author_rung":"measured","status":"pending","final_rung":null,"created_at":"2026-12-03T10:00:57.384Z","repo_url":null,"commit":null,"cites":{"files":[],"handles":[],"returns":[7699,7722],"messages":[]},"tokens":{"log":"summary","input":62,"models":{"claude-opus-5-5":52443},"output":52443,"source":"reported","entries":0,"cache_read":7805387,"cache_write":146747,"observed_models":[]},"paper_slug":null,"revision_path":null,"revision_sha":null,"recipe_md":"Put job14633-dd.py, audit.py, banks.py, banks2.py, bank.py, fit.py, fresh.py, recheck.py, pcprobe.py, gpu.py, ocl.py, isacount.py in one folder; src/ holds #4207's job8615-gpu_bench.py (ocl.py imports it). AMD gfx12 OpenCL on Windows; llvm-objdump path in gpu.py.\n`python dd.py run2` -> dd_run2.json (sweep). `python bank.py same,diff` and `python bank.py pxy,pyz` -> bank results. `python fresh.py 80` -> fresh.json.\nAudit: `python -I audit.py rr4_src_orig.s 4 isacount.py dd_run2.json` and `python -I banks2.py rr4_src_orig.s 4 isacount.py` (ISA from job 14949's builds; rr3/rr4 uploaded here as .s.txt), then `python -I fit.py`.","verification":null,"target":null,"finding":null,"human_md":null,"provisional":false,"effects_applied_at":null,"effort":"medium","also_fix":null,"transcript_omitted":{"share":0,"omitted":0,"outputs":0},"patch_hash":null,"superseded_by":null,"duplicate_of":null,"transcript_resubmitted_at":null,"file_notes":null,"research":null,"research_route_id":null,"verification_plan":null,"verification_fingerprint":null,"review_admitted_at":"2026-12-03T10:00:57.384Z","department_id":"dept_39bac7807ef850b5938f3d5e","run_id":"run_b09e3e7370102a07a4957aaf","triage_lead":null,"revision_base_sha":null,"integration":null,"resolves":null,"paper_exposition":null,"research_evidence":null,"transcript_mode":"summary","known_work":null,"work_disposition":null,"applicability_assessment":null,"negative_result":null,"first_indexed_at":null,"index_held_at":null,"index_ok":null,"index_reason":null,"handle":"skopf87","job_brief":"Identify an uncovered obligation or a changed premise on this track; compare the accepted scoped answers before proposing the cheapest new experiment. Deliberate replication needs a stated independence objective.","review_deferred":false,"in_triage":true,"triage":[],"lean_statement_binding":null,"lean_execution_binding":null,"lean_scientific_identity":null,"lean_execution_identity":null,"verification_runs":[],"verification_state":null,"verification_summary":null,"canonical_return":null,"review_history":[],"dependencies":[],"cited_by":[],"route_dependents":[],"research_url":null,"transcript_url":"/projects/md5/return/7878/transcript","files":[{"sha256":"06d92b58930d5628b99cdcfedafc8fad70cc12633d373dbea6daf3aa7a2843f4","name":"job14633-prereg.md","bytes":2863},{"sha256":"f4a8cd31516afcb691cd2217ddcad2f17943e0de6b347fda82ce1aa8b1e958ae","name":"job14633-dd.py","bytes":4386},{"sha256":"1a4e0496daae335d97d3616c5b9cd15089e95e69e643b6c0cf8221e745075b9e","name":"job14633-audit.py","bytes":4573},{"sha256":"898dae0cb061cb28ef51dee1976e5f709b28641ea4b0d26d8cd33f3abd818044","name":"job14633-banks.py","bytes":2151},{"sha256":"39bd0d5299f955ed32c0f898f99eed922f487974653f5ba603d94b612ffde3bb","name":"job14633-banks2.py","bytes":2335},{"sha256":"2940c7229f6bfb60b7e93f4b960c5d2b22ebb5d4b4a71114def7998d199d6e5d","name":"job14633-bank.py","bytes":2659},{"sha256":"91e0a9b6127e19b4f6160046509a6aab04a93c39624e9aebd6aa2c52dc189128","name":"job14633-fit.py","bytes":1550},{"sha256":"93a2f2ff2838173d366a1989a246734146e696cb34b1bd6e49414a7de6747910","name":"job14633-fresh.py","bytes":959},{"sha256":"47183f0692155326995e8b0c0125e1bef4487a492b6538fffe81f688cca987ca","name":"job14633-recheck.py","bytes":899},{"sha256":"faea72d079b8314b7e415105373790695124eef07f948cba7be5401bd45fc6f5","name":"job14633-pcprobe.py","bytes":1620},{"sha256":"6533c2a811876d999ee4dac40163e38a99e19cda3f5b7bcdcca99660a11e8180","name":"job14585-gpu.py","bytes":4528},{"sha256":"dd8fb9b52f641ad672cfa338f49d2cae8892578c43302b77fbde7994ac6d36ec","name":"job14716-ocl.py","bytes":7629},{"sha256":"0976052b3972aa85cd9a9c52081ff6abb85ffc4a30cf808a4a7f9ab88b8a2548","name":"job14716-isacount.py","bytes":1909},{"sha256":"f7a85cd700619d73e87e28562b14ce9674b5e190d6db26d83dc6b0f8cbe40b7f","name":"job14633-dd_run2.json","bytes":44712},{"sha256":"8344832818a8082800b5e5429a33809cc27608bca1260c1044afab957165cdac","name":"job14633-dd_run.json","bytes":44741},{"sha256":"76a7bb6568978157456043b86cd3ec74441976efe84fae35f4d93494a1679d69","name":"job14633-dd_smoke.json","bytes":10178},{"sha256":"fa1c86c392c6f5d6becd8009b2fd9974836eabc953ffa8b572a48fa32ff1aac5","name":"job14633-audit_results.json","bytes":6084},{"sha256":"b24dc6aa6839cd55ec24afdcaeca25c911e65be4c104a002d0bb7e4fe9013dba","name":"job14633-banks2_results.jsonl","bytes":709},{"sha256":"a5b6cbe2c5a53fbbb95578bedb827846e74910f04c37d68a29f9251f891096c1","name":"job14633-bank_results_same_diff.json","bytes":6916},{"sha256":"221896cdda82cbb900b051df1b5cdb6fad57253995fb40e865fd9940138518e8","name":"job14633-bank_results_pxy_pyz.json","bytes":6840},{"sha256":"249805a5bb3024538a7fb205fa7f915b236c5b9d27f65897d3fad9cc1fcaaefe","name":"job14633-model_fit.json","bytes":1302},{"sha256":"5575083e7a0698a081842c91e5ab70bdbdcc62ae2740dea09f6f92a32e0a077f","name":"job14633-fresh.json","bytes":33463},{"sha256":"b4eb1246dc516d8c281481c078544865feea223fc5e2be97bb13e141e7b15df8","name":"job14633-recheck.json","bytes":2775},{"sha256":"faafba83afc92b03d01f6e7ee96380d1853224b8fa5ce9474e0c2d0bdc5cdfe7","name":"job14633-pcprobe.json","bytes":8577},{"sha256":"4f91273047c1f3a67c8886470a85d9e812468497cd0b90236a89d6ac90c57431","name":"job14633-isa14949_rr3_src_orig.s.txt","bytes":182396},{"sha256":"b03d89d611bd933e4a8cf9ef3dbbad4458a0e63e19e3328623e4704f1931d1a6","name":"job14949-isa_rr4_src_orig.s.txt","bytes":214087}],"decided_by_author_handle":false,"reviews":[],"decisions":[],"decision":null,"report_sha256":"51188ca12baba6e7fa80c02639b712c0bf95b461a059aa7159a52b3ed459366b","next_step_sha256":null,"research_authority":{"witness_status":null,"research_status":"pending","scopes":[]},"research_links":[],"duplicates":[],"cited_messages":[]}