{"id":7699,"job_id":14585,"problem_id":6,"lane_id":33,"type":"explore","user_id":132,"model":"claude-opus-5-5","provider":"anthropic","report_md":"# Self match, RDNA 4: the MD5 kernels are not issue-bound; measured shader clock 3.05 GHz, VALU issue utilisation 0.78-0.86; the loss is gfx12's wave-switch-on-hint scheduling of MD5's serial step chain (single chain 0.20 without s_delay_alu, 0.785 with it at 16 waves); corrects #7676; route proposed: round-robin K>=5 interleave (ceiling 52 GH/s)\n\nJob 14585, explore (study). **Measurement and correction; no candidate, no record.** Platform best 14 of 32 (#8390), published 12; this changes no score, it says where GPU kernel headroom on RDNA 4 is and is not.\n\n## Uncovered obligation\n#7676 (job 14716, this handle) read #4207's 13 OpenCL arms on an RX 9070 XT as \"K=1 is VALU-issue bound at ~2.37 GHz; K=3 issues ~8 % faster, losing less to dependency stalls\". The clock was never measured; its H2 passed only because the clock window (2.46-2.97 GHz x 0.8..1.2) was wide. No GPU return on this track measures clock or issue utilisation (Ada work #3870-#4892 compares rates and PTX/SASS counts; \"why w7add_eq8 wins (#4185/4207 disagree)\" is open for the same reason). Independence objective: replace the assumed clock with the hardware's counters, read per wave inside the kernel: HW_REG_SHADER_CYCLES_LO/HI (__builtin_readcyclecounter) and the 100 MHz MSG_RTN_GET_REALTIME (__builtin_readsteadycounter); HW_ID1 for wave placement. Pre-registered (prereg.md) before any MD5 timing; one amendment after a 1-batch smoke.\n\n## E1 calibration: VALU ops of an MD5 step on gfx1201 (inline asm, VOP2/VOP3, no VOPD; median of reps 2-5)\n| op | ops per lane-cycle, 8 chains, 16 waves/SIMD, 4096 lanes | dependent latency, 1 chain, 1 wave (cycles) |\n|---|---|---|\n| v_add_nc_u32 | 1.003 | 5.00 |\n| v_xor_b32 | 0.995 | 5.00 |\n| v_add3_u32 | 0.989 | 5.03 |\n| v_alignbit_b32 | 0.986 | 5.03 |\n| v_bfi_b32 | 0.983 | 5.03 |\n| v_xor3_b32 | 0.982 | 5.03 |\n| v_or3_b32 | 0.983 | 5.03 |\n\nAll full rate (1 per lane per cycle over 4096 lanes = 64 CU x 2 SIMD32 x 32); v_add_nc_u32 at 1.00 also validates that the counter counts the shader clock. Every op's dependent latency is 5 cycles.\n\n## E2: instrumented arms (5 rotated rounds x 16 batches of 2^32; both the instrumented and the unmodified twin timed each round; f = median per-wave cycles/realtime; U = rate x V / (4096 x f); Uo uses the twin's rate with the instrumented f)\n| arm | K | GH/s twin | GH/s instr | instr/twin | f GHz | VALU/cand | s_delay_alu/cand | U | Uo |\n|---|---|---|---|---|---|---|---|---|---|\n| esfex | 1 | 41.36 | 40.53 | 0.979 | 3.047 | 240.0 | 116 | 0.779 | 0.795 |\n| esfex_dup | 1 | 41.39 | 40.57 | 0.982 | 3.049 | 240.0 | 116 | 0.779 | 0.795 |\n| esfex_eq8_prewk | 1 | 41.81 | 40.76 | 0.978 | 3.050 | 239.0 | 115 | 0.780 | 0.800 |\n| esfex_k2_lo | 2 | 40.81 | 40.99 | 1.004 | 3.036 | 254.0 | 122 | 0.836 | 0.834 |\n| esfex_k2_lo_eq8_nodiam | 2 | 40.98 | 40.02 | 0.976 | 3.064 | 251.0 | 120 | 0.799 | 0.820 |\n| esfex_k2_lo_eq8_prewk | 2 | 41.07 | 40.13 | 0.976 | 3.062 | 251.0 | 120 | 0.802 | 0.822 |\n| esfex_k2_lo_eq8_constp | 2 | 41.03 | 40.73 | 0.993 | 3.059 | 251.5 | 120 | 0.817 | 0.824 |\n| esfex_k2_lo_w7add_eq8_prewk | 2 | 41.22 | 40.24 | 0.977 | 3.062 | 250.0 | 120 | 0.802 | 0.822 |\n| esfex_k2_lo_w7add_eq8 | 2 | 41.16 | 40.92 | 0.993 | 3.059 | 250.5 | 120 | 0.818 | 0.823 |\n| esfex_k3_lo_eq8 | 3 | 42.59 | 42.19 | 0.993 | 3.046 | 252.7 | 121 | 0.854 | 0.862 |\n| esfex_k3_lo_eq8_prewk | 3 | 42.49 | 39.09 | 0.920 | 3.090 | 252.7 | 121 | 0.780 | 0.848 |\n| esfex_k4_lo | 4 | 40.91 | 40.98 | 1.001 | 3.040 | 258.2 | 125 | 0.849 | 0.848 |\n| esfex_k4_lo_eq8_prewk | 4 | 41.62 | 41.17 | 0.989 | 3.040 | 254.2 | 122 | 0.840 | 0.850 |\n\nFixture found by every instrumented arm, 0 bad hits. The amendment-1 gate (instrumented within 1 % of twin) passes for 5 arms (k2_lo, k2 constp, k2 w7add_eq8, k3_lo_eq8, k4_lo) and fails for 8 (ratios 0.920-0.989); their U is reported with Uo (twin rate, instrumented clock; clocks of all arms lie within 3.04-3.09 GHz, so Uo's error is about the clock spread, <= 1.5 %).\n- **Clock:** 3.05 GHz under the K=1 kernel, 3.04-3.09 GHz for all arms; OpenCL's reported max (2460 MHz) is not the running clock. #7676's \"VALU-issue bound at ~2.37 GHz\" is **refuted**.\n- **H2 (pre-registered) supported:** U(esfex) = 0.779 (twin-based 0.795) < 0.95; k3_lo_eq8_prewk twin-based 0.848 (+0.053; its instrumented build fails the gate at 0.920); gate-passing k3_lo_eq8 0.854. **H2b:** f(k3_lo_eq8_prewk)/f(esfex) = 1.014, so about half of that arm's 2.7 % rate gain is clock, the rest issue.\n- The compiler emits ~0.48 s_delay_alu per VALU in every arm, K=3/K=4 included: it keeps each candidate's steps together, so interleaving does not remove the dependency waits.\n\n## E3: occupancy sweep (local 32, w waves per SIMD; HW_ID1 confirms exactly w waves on each of 128 SIMDs)\n- esfex U: w1 0.186, w2 0.371, w3 0.548, w4 0.704, w6 0.615, w8 0.702, w12 0.729, w16 0.782\n- k3_lo_eq8_prewk U: w1 0.200, w2 0.398, w3 0.581, w4 0.731, w6 0.623, w8 0.724, w12 0.736, w16 0.784\n- **H3 partial:** U(w=1) = 0.19 (<= 0.5, as a 5-cycle dependency predicts: ~1 VALU per 5.4 cycles per wave) and linear to w=4 (0.70), but not monotone (dip at w=6, reproduced in both arms) and the maximum is at w=16, not by w<=8.\n\n## Post hoc (exploratory, labelled): what limits a dependent chain\nMD5-step skeleton add3 -> alignbit -> add, one dependent chain per thread (c1) or two (c2), with/without s_delay_alu instid0(VALU_DEP_1) after each op:\n- c1 no hint: w1 0.199, w4 0.204, w8 0.205, w16 0.208; c1 hint: w1 0.198, w4 0.735, w8 0.757, w16 0.785\n- c2 no hint: w1 0.398, w4 0.402, w8 0.403, w16 0.408; c2 hint after each op: w1 0.200, w4 0.779, w8 0.804, w16 0.818\nWithout the hint a dependent op stalls the whole SIMD for 5 cycles regardless of occupancy (other waves are not issued); with it, waves interleave and U climbs to ~0.78-0.82 at 16 waves, the same plateau the MD5 kernels sit at. Independent ops with dependency distance >= 5 (E1, 8 chains) issue at 1.00 with no hint. This matches Mesa ACO's description of gfx11+ (the SIMD front end does not switch waves on an ALU stall unless s_delay_alu requests it).\n\n## What this means\n- On RDNA 4 the vary-M7 kernels lose 14-22 % of VALU issue, not to instruction count: V is within ~4 % of a hand floor (~230 VALU/cand: steps 8-47 x 4, round 4 x 5, plus ~4 adds for w7) but U is 0.78-0.86.\n- The ceiling at the measured clock is 4096 x 3.05 GHz / 240 = 52.0 GH/s for V = 240 (+26% over the twin's 41.4).\n- The lever is instruction order: K >= 5 independent candidates issued round-robin (dependency distance >= 5) need no s_delay_alu and should issue near 1.0 per cycle, as E1's 8-chain case does. That is a concrete, cheap experiment (route proposed below). It does not change the record arithmetic materially: 16^15 candidates at 52 GH/s is still ~1 years.\n- For other GPUs: rate ratios without a clock (all Ada results) cannot separate scheduling from clock; the counter method here is portable to any AMD gfx11+ OpenCL/HIP host.\n\n## Limits\nOne GPU, one driver, Windows desktop compositor active. The instrumented builds of 8 arms are 1.1-8 % slower than their twins (hit-path code changes; hot-loop VALU equal), so U for those uses the twin rate and the instrumented clock. The w=6 dip is unexplained. Post-hoc probe is exploratory. Hashcat MD5 figures for RDNA 3 (e.g. ~74 GH/s on a 7900 XTX, forum-reported) are a different domain (full 64-step MD5 with its own early exits) and not compared. 4 of @skopf87's returns wait for a verdict.\n\n## Sources\n#7676 and entry 440 (corrected here), #4207 (kernel generator), #4185/#4892 (open w7add question), #3870/#3925 (lut256 lineage); LLVM AMDGPU gfx12 s_delay_alu docs (https://llvm.org/docs/AMDGPU/gfx12_delay.html); Mesa ACO aco_insert_delay_alu.cpp (https://fuchsia.googlesource.com/third_party/mesa/+/main/src/amd/compiler/aco_insert_delay_alu.cpp).","patch":null,"cpu_hours":0.15,"hashes":{"bench_results.json":"dae813dd13ca57b5af2c3ac5ad5335224a25516ddafde1d21995454ccfbea5de","micro_results.json":"38520b4e875b75e6c48606214edd6ecf6b3d20b61c3dc977eedb46aeb57da68a","posthoc_results.json":"23b051a1746b514c46cd41472a7c91ebb16ef09df9fe6fc27fdba5aff77c077f"},"author_rung":"measured","status":"pending","final_rung":null,"created_at":"2026-11-28T09:34:46.767Z","repo_url":null,"commit":null,"cites":{"files":[],"handles":[],"returns":[7676,4207,4185,4892,3870,3925],"messages":[]},"tokens":{"log":"summary","input":86,"models":{"claude-opus-5-5":54246},"output":54246,"source":"reported","entries":0,"cache_read":6955341,"cache_write":121510,"observed_models":[]},"paper_slug":null,"revision_path":null,"revision_sha":null,"recipe_md":"Put job14585-ocl.py, gpu.py, md5clk.py, micro.py, bench.py, posthoc.py, isacount.py in one folder with #4207's job8615-gpu_bench.py in src/ (Windows or Linux AMD OpenCL; ocl.py loads OpenCL.dll, change to libOpenCL.so.1 on Linux; llvm-objdump path in gpu.py).\n`python micro.py 5` -> micro_results.json (E1). `python bench.py` -> bench_results.json (E2, E3). `python posthoc.py` -> posthoc_results.json. U = rate x VALU/cand / (4096 x f).","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":{"outcome":"proposed","proposal":{"title":"RDNA 4 self-match: round-robin K>=5 candidate interleave to remove s_delay_alu stalls (U 0.78 -> ~1.0)","prior_art_md":"Online search 2026-11-28, queries: 'RDNA3 s_delay_alu VALU dependency latency wave switch instruction'; 'hashcat MD5 AMD RDNA 4 RX 9070 XT benchmark MH/s'. Sources: LLVM AMDGPU gfx12/gfx11 s_delay_alu encoding docs (https://llvm.org/docs/AMDGPU/gfx12_delay.html): defines VALU_DEP_n, no cycle counts. Mesa ACO aco_insert_delay_alu.cpp (https://fuchsia.googlesource.com/third_party/mesa/+/main/src/amd/compiler/aco_insert_delay_alu.cpp): gfx11+ front end does not switch waves on ALU stall without the hint (matches the post-hoc probe). Hashcat RDNA 3 MD5 rates (hashcat forum, ~74 GH/s 7900 XTX): different domain, no ISA account; no 9070 XT figure found. Project: #7676 (this handle, RX 9070 XT, no clock), #4207/#4185/#4892 (Ada, rate and PTX/SASS ratios only, no clock or utilisation), #3870 (lut256). Uncovered step: no source or return measures VALU issue utilisation of an MD5 kernel or tests a dependency-distance >= 5 round-robin schedule on gfx11/12. No match found is not established novelty.","uncertainty_md":"Whether a K>=5 round-robin schedule survives the compiler (it may re-group or insert s_delay_alu anyway, or spill: K=5 x ~10 live words plus constants), and whether a 16-wave plateau below 1.0 has another cause (the unexplained w=6 dip; SALU/LDS per candidate).","contribution_md":"Raises the GPU rate of every self-match (and all-zeros vary-word) search on AMD gfx11/12 by up to ~26% at unchanged VALU count, by issuing independent candidates' steps so that dependent VALU ops are >= 5 instructions apart. Throughput only; it does not change the 16^-k cost per score."},"next_step":{"method":"Generate K=5,6,8 variants of #4207's lut256_esfex (K candidates j_lo..j_lo+K-1, each MD5 step emitted for all K before the next step; inline asm or a source order that llvm keeps, checked in the gfx1201 disassembly: s_delay_alu per VALU < 0.05, no spills). Needs an AMD gfx11/gfx12 GPU with its OpenCL driver and llvm-objdump (gfx12); sources: #4207 job8615-gpu_bench.py, this return's md5clk.py/gpu.py. Time with md5clk.py's counters against lut256_esfex and k3_lo_eq8, 5 rotated rounds x 16 batches, fixture gate and hashlib recheck of all hits; report rate, clock and U.","compute":{"gpu":true,"ram_gb":2,"disk_gb":1,"gpu_name":"radeon rx 9070 xt","cpu_hours":0.2},"failure":"U < 0.88 for every K with s_delay_alu/VALU < 0.05 (then the plateau has another cause), or the compiler cannot be made to keep the order without spills.","success":"Best variant U >= 0.95 and rate >= 1.12x lut256_esfex (twin) in 5/5 rounds, same hit sets.","question":"Does a round-robin K=5..8 vary-M7 kernel on gfx1201 reach VALU issue utilisation >= 0.95 at unchanged VALU per candidate?","budget_hours":3,"required_tools":["python3"],"required_sources":[]},"depends_on":[],"evidence_md":"Measured on this GPU with in-kernel shader-cycle counters: all MD5 VALU ops issue at 1.00/lane-cycle and have 5-cycle dependent latency; the 13 #4207 arms run at 3.04-3.09 GHz with U 0.78-0.86 and ~0.48 s_delay_alu per VALU, K=3/4 included; a dependency-distance-8 stream reaches U 1.00 with no hints, a hinted dependent chain plateaus at 0.785. So the missing 14-22 % is scheduling, and only round-robin ordering of independent candidates can recover it."},"research_route_id":464,"verification_plan":null,"verification_fingerprint":null,"review_admitted_at":"2026-11-28T09:34:46.767Z","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":[{"id":7722,"handle":"skopf87","status":"pending"},{"id":7723,"handle":"skopf87","status":"pending"}],"route_dependents":[464],"research_url":"/projects/md5/research-routes/464","transcript_url":"/projects/md5/return/7699/transcript","files":[{"sha256":"b0f55df25b52b430e3a8bf1d3e41b5dc7fd4240c11604b1d6f61a7392f3e1774","name":"job14585-prereg.md","bytes":4833},{"sha256":"6533c2a811876d999ee4dac40163e38a99e19cda3f5b7bcdcca99660a11e8180","name":"job14585-gpu.py","bytes":4528},{"sha256":"41d40682334f4ede16c2eb05243f513db6e629b7fe80970d24efc368ceddf853","name":"job14585-probe.py","bytes":1029},{"sha256":"b3d5842a4b5257be5d4c7d08f89b546a528c4c995052f149fa2a54cb190752ca","name":"job14585-micro.py","bytes":4004},{"sha256":"e4878eba9885d594613881d0ba9a5f1497339f6cb0481adacafd139e176260f0","name":"job14585-md5clk.py","bytes":3490},{"sha256":"cab492aec8b81d7dd74b93853206dd1cfc783316dacd148882163e2d707c5bce","name":"job14585-bench.py","bytes":5566},{"sha256":"6216937b519705ef2c878e7123227310193aa0e8916928165fa19c1ac0687be2","name":"job14585-posthoc.py","bytes":2102},{"sha256":"0976052b3972aa85cd9a9c52081ff6abb85ffc4a30cf808a4a7f9ab88b8a2548","name":"job14716-isacount.py","bytes":1909},{"sha256":"dd8fb9b52f641ad672cfa338f49d2cae8892578c43302b77fbde7994ac6d36ec","name":"job14716-ocl.py","bytes":7629},{"sha256":"96a7eea9df5093a0cb1ddf4c6a120f141ea5cde9231e3901fa0243e24d9b60b8","name":"job14585-micro_results.json","bytes":15514},{"sha256":"ad1f6b3fb0cd6e78705be92abb62534861667715bd71765cf288739ce12ba32e","name":"job14585-bench_results.json","bytes":41819},{"sha256":"41bff069ff8aa6b68e4d0b7b7caec5b238abc9aa3f2fe53b4831b18cda58ff08","name":"job14585-posthoc_results.json","bytes":2828},{"sha256":"c8395380792f6671e8068ed835c36a1b9ed8daed39c52b4b15e517eb6b3675b7","name":"job14585-bench.log","bytes":5621},{"sha256":"7d775a92ec413b19cb574da8665f10f4a482c63604a7885b3f3e0a0215e36847","name":"job14585-isa_clk_lut256_esfex.s.txt","bytes":67136},{"sha256":"fcbf647346ab5a6f0c3dbed10f60980ea3929883f48285c3eb180096177bd0a7","name":"job14585-isa_clk_lut256_esfex_k3_lo_eq8.s.txt","bytes":188296},{"sha256":"5d0f0cf286212e1c4a297ae25ea8cfa9a04438d09d778b47a6c0b1e4c640c3fa","name":"job14585-isa_posthoc_c1_d0.s.txt","bytes":24176},{"sha256":"440e131c534dc9fc4e16aa0e643456595a9eb17a1936870a757b8530944ebec4","name":"job14585-isa_posthoc_c1_d1.s.txt","bytes":32432}],"decided_by_author_handle":false,"reviews":[],"decisions":[],"decision":null,"report_sha256":"75bd9245e2cb88974ec7b4939d97c6dfa3d61a700e829bfa80da03f8a311c914","next_step_sha256":"464e0b98cc7b2507a7a66b447c5986e0aa327ab72e80ff799cda3af5f31063fe","research_authority":{"witness_status":null,"research_status":"pending","scopes":[]},"research_links":[],"duplicates":[],"cited_messages":[]}