Repository navigation
[HIP] [FlyDSL] Conv3d gfx1250 Optimization - #7503
Conversation
The gfx1250 conv3d kernel already takes num_buffers and main_loop_unroll (the A16W16 GEMM pipeline knobs) but the tuner never swept them and the tuned CSV could not carry them, so every row ran 2 buffers, no unroll. - tuned CSV: optional num_buffers / main_loop_unroll columns; the runtime lookup reads them and run_conv3d_gfx1250 uses them unless the caller passes its own (empty or absent -> 2 buffers, no unroll) - conv3d_tune.py: --pipelines sweeps num_buffers:unroll pairs per tile (recording the clamped value that runs); --tiles_from/--tiles_topk restricts each shape to its fastest tiles from an earlier -o2 profile, for a two-pass tile-then-pipeline tune - README: two-pass gfx1250 tune and the new columns
🏷️ CI GuideRuns automatically on every PR:
Extended tests (opt-in via labels):
One backend per PR: PR title tags & labels: |
READY FOR HUMAN REVIEWPR Self-ReviewRevision Author self-review accepted. Readiness report: Author answers
Show the author's self-review answersBehavior and intentValidation and unverified scopePR-specific questionChanged op testsPR state
Copilot findings
Code and op-test hygiene
Required CI
Shadow mode reports what would block but keeps the status successful. Set |
…-loop barrier tile_k: a K tile can now span tile_k channels (a multiple of 32 dividing C/groups padded to 32), so the K loop takes one tensor_wait + barrier per tile_k instead of per 32 channels. In LDS the tile stays a run of padded 32-channel chunks (pad interval 32), and TDM sees the global channel axis split the same way, as (tile_k/32, 32). WMMA K step ks reads chunk ks. tile_k=32 keeps the previous layouts unchanged. The tuned CSV gains an optional tile_k column (default 32), conv3d_tune.py a --tile_ks sweep. Split-K stays at tile_k=32. Race fix: s_barrier does not wait for outstanding LDS reads on gfx1250, so a wave could pass the K-loop barrier with its fragment reads of the slot the next trip's TDM refills still in flight, and a faster wave's refill could land under them. Wait on dscnt before that barrier. It showed as sporadic mismatches (44-127 of 2.4M elements, varying run to run) on a small-tile tile_k=96 config; 50 runs clean after the fix, and the shipped tile_k=32 configs time the same (0.993-1.009x).
… and tile_k The 22 tuned 368x544 rows of wan21_vae_gfx1250_bf16_tuned_conv3d.csv, retuned in two passes on gfx1250 (tiles at the default pipeline, then each shape's 4 fastest tiles with --pipelines 2:0,2:1,3:0,3:1,4:0,4:1 --tile_ks 32,64,96,128), now carry num_buffers / main_loop_unroll / tile_k. The 480x832 rows are unchanged and leave the new columns empty (2 buffers, no unroll, tile_k 32). Same GPU, alternating with main: one 81-frame 368x544 encode + decode, all 24 FlyDSL conv shapes, 343.9 -> 224.6 ms (0.653x); down_0_1 1493.7 -> 1034.9 us. Every changed row 10 calls NaN-filled and the production entry 3 calls per shape, no mismatched element.
On gfx1250, python op_tests/test_flydsl_conv_implicit.py (mode=ci) failed 7 of 21 cases on main, none of them numerically: - Six host-path checks spied on conv_kernels.compile_conv3d_implicit, the gfx950 compile entry, which the gfx1250 backend never calls, so they reported 'no implicit compile parameter was observed'. The spies now hook the compile entry of the device's own backend. On gfx1250 they assert what that backend has: the explicit tile / block_rows / split-K reach the compiled param, and the static case really runs static extents. The static case now also turns off the gfx1250 host's own AITER_CONV3D_DYN_HW copy, and the tuned-lookup spy checks the gfx1250 compile param as well. The gfx950 assertions are unchanged. - 2d_splitk2 passes tile=(32, 32, 1, 2) without block_rows; the gfx1250 host defaulted to block_rows=8, i.e. 4 columns, which is not a legal R x C block. An explicit tile now falls back to a legal block_rows the same way a tuned row already did. gfx1250 (MI450X): mode=ci 21/21 passed. tests/test_conv3d_ci_modes.py 20 passed, including a new check of the gfx1250 assertion.
…and tile_k Tuned gfx1250 rows now set num_buffers / main_loop_unroll / tile_k, which the CI-mode subset never reached: its tuned conv_in row runs tile_k 32 and the compact cases run the heuristic tile. Add three gfx1250-only cases on compact 3x3x3 shapes, each 2 warmups + 10 checked calls, which call the gfx1250 host directly (the public entry does not take these knobs) and assert the requested config is the compiled one: - tile_k 96, num_buffers 3 (the down_0_1 config) - tile_k 96, num_buffers 3 + unroll, 32x32 tile, K=3 (the config that exposed the K-loop LDS race) - tile_k 64, num_buffers 4 + unroll, C=K=192 Skipped elsewhere, so gfx950 CI is unchanged. gfx1250 (MI450X) mode=ci: 24/24 passed; 33 s with an empty FlyDSL cache, 2.5 s warm. Perf mode summarizes the same cases in their own table. docs/conv3d-ci.md notes the gfx1250 additions.
…x544 hot rows Stride-1 kH x kW > 1 convs can now fetch the im2col input once per (kT, channel) group as one (R + kH - 1) x (C + kW - 1) TDM patch that all kH * kW taps read at constant LDS offsets; the weights keep the per-tap ring. The next group's patch is issued a whole group ahead, after that step's B tile, so in-order TDM completion still orders it before the B it is waited with. The per-tap loop and the patch loop share one prelude; the default path's ISA is unchanged on the nine hot configs. The tuner sweeps it with --patches (optional `patch` CSV column; empty means off). Two buffers with tile_k > 32 is pruned: it spills VGPRs on most patch tiles, and a kernel with scratch faults on gfx1250. Eight of the nine Wan2.1 368x544 hot rows switch to the patch path; the 480x832 rows and the Qwen-Image table are unchanged. Same MI450X, back to back: the nine hot layers go from 207.0 to 179.1 ms per 368x544 pass (0.865), down_0_1 1033.8 -> 881.2 us; 0 mismatches at rtol=atol=2e-2. CI mode adds two patch cases (26/26 on gfx1250).
…LDS clamp The prune of 2-buffer patch variants with tile_k > 32 looked at the requested num_buffers, so a 3 or 4 the LDS clamp brought down to 2 still ran; check the clamped value instead. Also correct the reason: those are the only patch variants that spilled VGPRs on the Wan2.1 hot layers (42 of 500), and one of them hit a memory access fault on gfx1250. Other spilled ones ran correctly, so spilling alone is not shown to fault. The shipped rows are unaffected: none of the eight patch winners is such a variant, and all eight stay in the candidate set (401 on the hot rows).
…, tile_k and patch The 22 Wan2.1 480x832 rows still carried main's configs. Retuned on gfx1250 the way the 368x544 rows were: each shape's 4 fastest pass-1 tiles over --pipelines 2:0,2:1,3:0,3:1,4:0,4:1 --tile_ks 32,64,96,128, and its 8 fastest over --pipelines 2:0,3:0,4:0 --tile_ks 32,64,96 --patches 1; the patch winner is taken where it beats the per-tap winner by more than 2% (14 of 22 rows). Every candidate that ran passed strict_compare. Same MI450X, alternating with main, kernel time only, all 24 FlyDSL conv shapes of one 81-frame 480x832 encode + decode: 618.1 -> 366.2 ms (0.592); 0 mismatches at rtol=atol=2e-2 (10 calls per shape into a NaN-filled output, and 3 through flydsl_conv_implicit). The 368x544 rows and the Qwen-Image table are unchanged.
Commit 6 ran the patch pass on the 9 hot 368x544 rows only. The other 13 rows: 6 have stride 2 and take no patch; the 7 stride-1 ones were swept with --pipelines 2:0,3:0,4:0 --tile_ks 32,64,96 --patches 1 on their 8 fastest pass-1 tiles (356 candidates, all passing strict_compare). 6 of 7 beat their row by more than 2% and switch to the patch path. Same MI450X, alternating with main, all 24 FlyDSL conv shapes of one 81-frame 368x544 encode + decode: 344.0 -> 195.9 ms (0.570; 224.6 ms before the patch rows). 0 mismatches at rtol=atol=2e-2.
…e, tile_k and patch The 32 rows still carried main's configs and no pipeline columns. Tuned as the Wan2.1 rows: each shape's 4 fastest pass-1 tiles over --pipelines 2:0,2:1,3:0,3:1,4:0,4:1 --tile_ks 32,64,96,128 (2024 candidates), and its 8 fastest over --pipelines 2:0,3:0,4:0 --tile_ks 32,64,96 --patches 1 (1138 candidates); the patch winner is taken where it beats the per-tap winner by more than 2% (21 of 32 rows). Every candidate that ran passed strict_compare. Same MI450X, alternating with main, kernel time only: 1024x1024 25.70 -> 17.73 ms (0.690), 1328x1328 41.87 -> 29.41 ms (0.702); no shape slower. 0 mismatches at rtol=atol=2e-2 (10 calls per shape into a NaN-filled output, and 3 through flydsl_conv_implicit).
…ch configs The 2-buffer patch configs with tile_k > 32 spill VGPRs, and one of them (t128x192 w2x2 r4, tile_k 96, on Wan2.1 down_6_7) read wrong bias offsets and faulted. Root cause is in LLVM: AMDGPUMarkLastScratchLoad tags spill reloads th:TH_LOAD_LU before the post-RA scheduler runs, and the scheduler moved an LU reload above another reload of the same slot, which then read stale scratch. Those configs now compile with disable-post-ra. On that config the register allocation is unchanged (1024 VGPRs, 32 spilled) and the LU-then-reload sites go from 4 to 0; on the GPU it is 0 mismatches in 10 calls with no fault. The 152 kernels of the two shipped gfx1250 tables are byte-identical in .text, and none of them spills. The tuner keeps skipping these variants (they are slow); its comment and the README now give the reason. CI mode 26/26 on gfx1250.
Revert 122a094's kernel change: the fault it works around is an LLVM issue, and it only reaches configs that no shipped row uses and that the tuner already skips. The kernel is back to 97ae390, whose 152 shipped kernels were validated as is. The tuner comment and README keep the root cause (LLVM's post-RA scheduler moving a last-use spill reload above another reload of the same slot) as the reason those variants stay pruned.
…ng patch configs Re-applies 122a094's kernel change, which touches only this conv3d kernel: the 2-buffer patch configs with tile_k > 32 compile with disable-post-ra, set for that compile only (FlyDSL restores LLVM options after each compile). The kernel file is identical to 122a094, which was validated: 152 shipped kernels byte-identical in .text, the faulting config 0 mismatches in 10 calls with no fault, CI mode 26/26. The tuner comment and README now state both the root cause and the workaround.
…ore per 8 channels) A lane's 8 accumulator columns are 8 consecutive output channels. With NDHWC output they are contiguous, and with K and the per-group K multiples of 8 they are 16-byte aligned and wholly inside or outside a channel tail. The epilogue stored them as 8 separate 16-bit buffer stores and read the bias as 8 dword loads per (wm, wn); it now does one 128-bit store per 8 channels (routed to the OOB sentinel when masked) and reads each wn's bias once as two dwordx4 loads. NCDHW output, BIG_OUT, split-K and K % 8 != 0 keep the per-element path. On down_0_1's tile the epilogue goes from 192 stores and 192 bias loads per wave to 24 and 12. Same MI450X, back to back with the previous head, same tuned tables, every FlyDSL conv shape: Wan2.1 368x544 196.1 -> 122.3 ms (0.624), 480x832 365.9 -> 226.9 ms (0.620), Qwen-Image 1024x1024 17.69 -> 9.14 ms (0.517), 1328x1328 29.37 -> 13.81 ms (0.470). 0 mismatches at rtol=atol=2e-2. The 152 kernels of both tables compile with no spills. CI mode adds two NDHWC cases (a channel tail, and the patch path): 28/28.
…n block for every layout The bias read only needs a lane's 8 columns aligned and wholly inside or outside a channel tail (per-group K a multiple of 8), not NDHWC output, so the NCDHW path now loads each wn's bias once as two dwordx4 loads too instead of 8 dword loads per (wm, wn). Same MI450X, back to back, Wan2.1 368x544 with NCDHW output (the production entry's default layout): 130.7 -> 125.2 ms (0.958); conv_in 359 -> 226 us. NCDHW is now within 2% of NDHWC (122.6 ms). 0 mismatches; both tables' 152 kernels compile with no spills; CI mode 28/28.
The tables were tuned while the epilogue was per-element; with commits 12-13 the store cost moved, so the hot rows were swept again (Wan2.1: a fresh tile pass, then the top tiles over pipeline / tile_k and patch; Qwen-Image: the top tiles of the earlier tile pass). Only rows that beat the current one by more than 3% in both rounds of a same-GPU A/B are taken: Wan2.1 480x832 conv_in and wdec_up_192_L0, Qwen-Image 1024x1024 res_96_L0, 1328x1328 res_192_L1 and dec_up_192_L0 (0.69-0.93x each). Every other row is unchanged. Same MI450X, back to back with the previous tables: Wan2.1 480x832 0.979x, Qwen-Image 1024x1024 0.960x, 1328x1328 0.971x, Wan2.1 368x544 unchanged. 0 mismatches at rtol=atol=2e-2 (10 calls per shape into a NaN-filled output, and 3 through flydsl_conv_implicit); AOT of both tables builds and checks, no kernel spills.
…hapes The gfx1250 candidate list is ordered largest tile first and cut at max_configs, so on a small GEMM M every survivor launches fewer blocks than there are CUs. When even the top candidate underfills the device, the policy now also appends every wave/block_rows variant of the six tile shapes with the best grid fill (blocks / whole waves of CUs, rounded to one decimal, ties broken by the area-first order). Larger shapes get the same list as before, so their tuned rows are unaffected. On the Wan2.1 368x544 encoder mid block (M = 3128, N = 384, K = 10368) this is what lets the tuner reach 128x48 w4x1 r8, which is not in the old list.
…4 mid block The Wan2.1 encoder's temporal downsample convs (kernel 3x1x1, stride 2x1x1, 20 calls each per encode) were missing from the untuned table, so gfx1250 ran them on the heuristic tile. Add the four shapes (192 and 384 channels at 368x544 and 480x832) and tune them. Retune the 368x544 mid block row with the grid-fill candidates, its pass 1 ranked at 4 buffers / tile_k 96 since the default 2 buffers / tile_k 32 does not order these deep-K tiles usefully. The 480x832 mid block retune lost to the shipped row, which stays. MI450X (heliosr-1b114-a07-3), same GPU back to back, 2 rounds, rtol=atol=2e-2 0 mismatches; trees differ only in the two tables: 368x544 down_9_10_mid 40.45 -> 36.36 us (-10.1%), 160 calls 368x544 time_conv_192 14.00 -> 8.75 us (-37.5%) 368x544 time_conv_384 15.96 -> 10.46 us (-34.5%) 480x832 time_conv_192 24.72 -> 13.02 us (-47.3%) 480x832 time_conv_384 16.86 -> 12.03 us (-28.7%) CI mode 28/28.
conv3d gfx1250: K-loop pipeline, wide K tiles, kH×kW patch reuse, vectorized epilogue, retuned tables 2.52-2.76x over main on the Wan2.1 / Qwen-Image VAEs on MI450X (gfx1250); gfx950 unchanged. - Kernel: per-shape num_buffers / unroll, tile_k > 32, kH×kW input-patch reuse, vectorized NDHWC epilogue and bias, LDS read/refill race fix, disable-post-ra workaround for spilling patch configs. - Tuner / tables: new pipeline / tile_k / patch dimensions and small-M candidates; all gfx1250 Wan2.1 and Qwen-Image rows retuned, Wan2.1 time_conv rows added. - Tests: gfx1250 CI-mode op test 28/28 (was 14/21) with 7 new cases; 0 mismatches at rtol=atol=2e-2 on all VAE shapes.
Resolve the conflicts in csrc/flydsl_conv3d/conv3d_tune.py and README.md with ROCm#6662 / ROCm#7503, which brought the gfx1250 tuner with the same fp32 reference, strict_compare, run_kwargs and --run_config kernel_us this branch added. Take main's version and keep this branch's gfx950 part on top of it: a splitK=1 gfx950 candidate is timed as the kernel alone on prepared operands into a NaN-filled buffer (generate_data_kernel / run_flydsl_conv3d_kernel), split-K still through the entry point; conv3d_ref keeps the NCDHW-contiguous fp32 input; the docstrings and README say us is kernel-only on both archs.
Summary
Speeds up the gfx1250 (MI450X) FlyDSL implicit-GEMM conv3d on the Wan2.1 and Qwen-Image VAEs: kernel pipeline and K-tile changes, kH×kW input reuse, a vectorized epilogue, tuner extensions, and retuned gfx1250 tables. Every shape is 0 mismatches at
rtol=atol=2e-2, and no shape is slower than main.Performance
Kernel time only. Every FlyDSL conv shape of one pass is weighted by its calls (Wan2.1: one 81-frame encode + decode). NDHWC output; main and this PR alternate on the same GPU, median of 2 rounds.
Speedup = other time / this PR's MI450X time (> 1: this PR on MI450X is faster).
² The equivalent bf16 GEMM of every conv shape on MI450X, best backend per shape (section below). It was measured back to back with the conv on another MI450X (
heliosr-1b114-d01-3) at commit 14, where the conv took 64.57 ms; the speedup is from that same-GPU pair. The other passes are being measured.MI35X is the call-weighted
usof main's gfx950 tuned tables (wan21_vae_bf16_tuned_conv3d.csv,qwenimage_vae_bf16_tuned_conv3d.csv; gfx950, 256 CU). That is tuner timing on an MI35X, not a back-to-back run with the MI450X numbers.¹ The gfx950 table has no row for the two Wan2.1
time_convshapes, so the MI35X time covers 22 shapes, and its speedup compares the same 22 shapes (this PR: 67.87 ms at 368×544, 126.21 ms at 480×832).Measured at commit 14 (
af4bbc03a) onctheliosr-1b112-a08-1.Commits 15–16 (head
7acbb8d7c) add to this. In a same-GPU A/B against commit 14 onheliosr-1b114-a07-3, they take a further 0.87 ms off a Wan2.1 368×544 pass and 0.33 ms off a 480×832 pass:down_9_10_mid368×544 (160 calls)time_conv_192368×544time_conv_384368×544time_conv_192480×832time_conv_384480×832Against the equivalent bf16 GEMM (Wan2.1 368×544)
How far the conv is from a dense GEMM of the same size. Each conv maps to M = N·Do·Ho·Wo, N = output channels, K = Cin·kT·kH·kW, bf16 with bias. A full
csrc/gemm_a16w16/gemm_tuner.pysweep (FlyDSL, OPUS, Triton, torch, hipBLASLt) on the first machine picked the candidates; hipBLASLt won no shape. Each shape's top 8 FlyDSL / OPUS candidates plus Triton and torch were then timed back to back with the conv onheliosr-1b114-d01-3at commit 14, taking the fastest correct one. On the 8 largest-M shapes no FlyDSL / OPUS candidate was correct, so those are Triton or torch. The GEMM takes its A already in im2col layout, so it is a bound on the arithmetic, not a drop-in replacement.The conv is faster on 15 of the 24 shapes.
down_0_1down_3_4down_6_7down_9_10_midwdec_up_384_L1wdec_up_192_L0down_3_inwdec_conv_outconv_indown_6_inresample_96wdec_up_384_L2Conv speedup = GEMM time / conv time (> 1: the conv is faster).
down_9_10_mid1.11× faster, and the two 368×544time_convshapes (where the GEMM was 1.5–1.6× faster) 1.53–1.60× faster.conv_inpads C = 3 to 32 channels, so it does 10.7× the GEMM's MACs.Optimizations
2bbdfc8e1). The tuner now sweepsnum_buffers(LDS ring depth) andmain_loop_unroll, as the gfx1250 GEMM tuner sweepsstages/main_loop_unroll. They are carried as optional tuned-CSV columns, and a row without them runs as before.cdee510bc).tile_k(a multiple of 32 that divides C) lets one K step span more channels: onetensor_wait+ barrier pertile_kinstead of per 32 channels. For example,down_0_1goes from 81 K steps to 27.s_barrierdoes not wait for outstanding LDS reads on gfx1250, so a wave could pass the K-loop barrier while a faster wave's TDM refilled the slot it was still reading. Adscntwait before that barrier fixes the sporadic mismatches seen on one small-tile config.a7c2fa222). For stride-1 convs, the input is fetched once per (kT, channel) group as one (R + kH − 1) × (C + kW − 1) TDM patch in two LDS stages, and all kH·kW taps read it at constant offsets, cutting A traffic by up to kH·kW×. This is the gfx1250 counterpart of gfx950's kH×kW reuse, as an optionalpatchtuner/CSV dimension.e436796d4,9753a3351). A lane's 8 accumulator columns are 8 consecutive output channels. With NDHWC output they go out as one 16-byte store instead of 8 16-bit stores, and the bias is read as two dwordx4 loads per column block for every layout. Ondown_0_1, a wave's epilogue drops from 192 stores + 192 bias loads to 24 + 12.conv3d_tune.py).-o2profile), then--tiles_from/--tiles_topkwith--pipelines,--tile_ksand--patcheson each shape's best tiles.6bcafb476): when even the largest-first top candidate underfills the CUs, the tile shapes that fill them best are added.wan21_vae_gfx1250_bf16_tuned_conv3d.csv(368×544 and 480×832) andqwenimage_vae_gfx1250_bf16_tuned_conv3d.csvis retuned with the new knobs.time_convshapes (3×1×1, stride 2×1×1), which were missing from the untuned table and ran the heuristic tile, are added and tuned.122a0946d, re-applied inf9b18e20d). The 2-buffer,tile_k> 32 patch configs spill VGPRs.AMDGPUMarkLastScratchLoadtags spill reloads as last use before the post-RA scheduler, which can then move such a reload above another reload of the same slot. That reads stale scratch, and in one tuning run it caused a memory fault. These configs compile withdisable-post-ra, for that compile only; no shipped kernel changes, and the tuner still prunes them because spilling makes them slow. The change touches onlyconv3d_implicit_gfx1250.py.ae4a4a920,233561e72, plus cases ina7c2fa222/e436796d4). The conv3d CI-mode op test now passes on gfx1250; on main it failed 7 of 21 cases there, none numerically. There are 7 new gfx1250-only cases fortile_k,num_buffers, unroll, the race config, patch and the NDHWC epilogue, each asserting the requested config is the one compiled.Commits
2bbdfc8e1tunenum_buffers/main_loop_unrollper shapecdee510bctile_k> 32, K-loop LDS race fix3af1a0808retune Wan2.1 368×544 rowsae4a4a920conv3d CI-mode op test passes on gfx1250233561e72CI-mode cases for the new K-loop pathsa7c2fa222kH×kW patch input reuse,patchtuner/CSV dimension, 8 hot 368×544 rowsf3a0f9ac8tuner: prune 2-buffer wide-K patch variants after the LDS clampb49efdfd7retune Wan2.1 480×832 rowsbc1f3204fpatch pass on the remaining Wan2.1 368×544 rows97ae390e5retune Qwen-Image rows122a0946d/abac2c505/f9b18e20dpost-RA workaround for spilling patch configse436796d4vectorized NDHWC epilogue9753a3351vector bias read for every layoutaf4bbc03aretune 5 rows for the vectorized epilogue6bcafb476tuner: grid-fill candidates for small-M shapes7acbb8d7ctune Wan2.1time_convrows and the 368×544 mid blockAccuracy and testing
F.conv3d(with bias), rounded once to bf16,rtol=atol=2e-2. Any mismatched element fails.flydsl_conv_implicit. 0 mismatches, 0 NaN.strict_compare.python op_tests/test_flydsl_conv_implicit.py(mode=ci) on gfx1250: 28/28 at the head (14/21 on main; the new cases skip on other archs).tests/test_conv3d_ci_modes.py: 20 passed.--checkwithFLYDSL_RUNTIME_RUN_ONLY=1passes..textwith and without it. The faulting config runs 10 calls with 0 mismatches and no fault.black/ruffon the changed files.Not adopted, after measuring: the GEMM's
amdgpu-sched-strategy/ kernarg-preload codegen knobs; folding kH×kW into the channels forconv_inbefore the vectorized epilogue; an NCDHW result built as an NDHWC conv plus a permute; persistent tiles; per-wave tiles larger than the tuned ones (lower occupancy).PR Self-Review
Reviewed revision
7acbb8d7c73fBehavior and intent
flydsl_conv_implicit/run_conv3d_gfx1250now run the implicit-GEMM conv3d with:num_buffers,main_loop_unroll);tile_k);dscntwait before the K-loop barrier, which fixes an LDS read/refill race.time_convrows are added, and the tuner can sweep the new dimensions and small-M grid-fill tiles.Validation and unverified scope
Validated on MI450X (gfx1250, 256 CU), FlyDSL 0.4.2, image
rocm/fw-bringup-mlperf:gfx1250-atom-20261016. Hosts:heliosr-1b114-a07-3for the head;ctheliosr-1b112-a08-1andheliosr-1b114-d01-3for commit 14 data.python op_tests/test_flydsl_conv_implicit.py(mode=ci): 28/28 at the head (14/21 on main).python -m aiter.aot.flydsl.conv --csv <both gfx1250 tables>into an empty cache: 160/160 replays. Then--checkwithFLYDSL_RUNTIME_RUN_ONLY=1: all hits.rtol=atol=2e-2against fp32F.conv3drounded to bf16:flydsl_conv_implicit, 0 mismatches;black/ruff: pass.Unverified:
tile_k32, no patch). The epilogue, bias and race-fix changes apply to them too, but are exercised only by the CI-mode cases, not by a broad shape sweep.groups > 1anddyn_hwat untuned resolutions are covered only by the existing CI cases.flydsl_conv_implicit.tile_k> 32).PR-specific question
flydsl_conv_implicitaccepts gfx950 / gfx1250 only (_check_supported_arch). It sends gfx1250 torun_conv3d_gfx1250(_current_gfx() == "gfx1250"), andcompile_conv3d_implicit_gfx1250asserts the target is gfx1250. gfx950 keepscompile_conv3d_implicit, which this PR does not change._conv3d_impl), with fp32 accumulation and bias.tile_k> 32tile_k_unsupported_gfx1250)num_buffers_clamp_num_buffers), and to kH·kW with patchnum_buffers≤ kH·kW (patch_unsupported_gfx1250)disable-post-ratile_k> 32 onlycompile_conv3d_implicit_gfx1250then asserts them again:cgp % 32 == 0,2 <= num_buffers <= 8, enough K tiles for the pipeline,patch_unsupported_gfx1250(...) is None, andtile_ka multiple of 32. An unsupported combination therefore fails at compile time instead of producing wrong output. Tuned rows match exactly on (gfx, cu_num, full shape), so a row never applies to another shape.Changed op tests
op_tests/test_flydsl_conv_implicit.py:_compile_hook,_assert_host_path_gfx1250, and the gfx1250AITER_CONV3D_DYN_HWpatch).compile_conv3d_implicit. On gfx1250 they therefore never saw a compile and failed (6 of the 7 gfx1250 CI failures, none numerical).block_rows, split-K and static extents. No other test checks that explicit configs reach the gfx1250 kernel._PIPELINE_CASES(7 gfx1250-only cases, skipped elsewhere):num_buffers3/4 with unroll,tile_k64/96, the config that exposed the LDS race, patch with several (kT, channel) groups in 3D and 2D, and the NDHWC vectorized epilogue with a channel tail and with patch.