Repository navigation
[FlyDSL] [CI] Conv3d: default to representative Wan correctness, move full matrix to perf mode - #7331
Conversation
…rix to perf mode The standard CI command runs this file with no arguments, so the complete Wan2.1/Qwen-Image performance matrix ran inside a shard: 109 benchmarked rows, each timing both torch and FlyDSL through 101 profiled iterations. On the Aiter Test run for 09b616c this one file took 603.193 s. Leave the shared runner, sharding and timing aggregation untouched and split the behaviour at this file's own entry point instead. With no arguments the script now runs a correctness-only suite: the six Wan families that cover the distinct kernel paths (conv_in at the real 368x544, so the exact production tuned row and the compile parameter it selects are both verified, the other five at 64x64), six keyword regressions for the reuse, gating and split-K paths, and the unfiltered compile-key isolation and static-extent checks. Each row does two warmups and ten directly checked calls, keeping the existing rtol=atol=2e-2 bar with zero mismatched elements and an explicit finiteness check. There is no profiler, no run_perftest and no torch performance baseline, so no throughput columns are reported for these rows. --mode perf keeps the previous matrix, resolutions, tables and statistics unchanged; the new manual workflow dispatches exactly that command. Add a manual-only MI35X workflow for the full sweep: it resolves the requested physical GPU through ROCm SMI unique ID and PCI address, refuses anything but gfx950, requires 30 s of idle time before starting, monitors for external processes and stops only its own container. Its logs are a separate artifact and never feed the standard timing table. Add pure-CPU regression tests for the argument/mode split, the direct-call runner and the host split-K and reuse plans; they import no torch, aiter or FlyDSL and need no GPU. Test plan: - python tests/test_conv3d_ci_modes.py (19 tests, stdlib unittest only) - black --check and ruff check on both Python files - YAML, Bash and embedded-Python syntax validation of the new workflow - python op_tests/test_flydsl_conv_implicit.py --help, confirming argument parsing happens before any backend import Measured wall-time comparison of the old and new default entry point on an idle gfx950 card is still pending; this commit makes no speedup claim.
🏷️ 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 |
|
The split this makes — representative correctness by default, full matrix behind a manually dispatched workflow, and a test for the mode-switching itself — is the right shape. One thing worth knowing before it lands, and one suggestion. This file costs 4 seconds. Measured from three independent
That is worth saying only because the approach here is good and would pay for itself on a file that has some weight. In the same area:
Those five come to 1023s against this file's 4s, and Suggestion on Worth double-checking for this file specifically: |
|
Thanks — the 4 s number is this file's skip path, not its execution cost. In run 41372363913 the line you sampled comes from the MI300X leg: The eight Like-for-like on
Local A/B on one idle MI350X, per-variant caches, idle gate and external-process You are right that the saving on a 4 s gfx942 skip is exactly zero — that path On the suggestion: agreed, the mode/argument regression is the reusable part, and |
zufayu
left a comment
There was a problem hiding this comment.
Checked the mode split: --mode defaults to ci, and that path runs CI_KW_CASES + CI_WAN_CASES rather than returning early, so the default CI invocation (python3 <file>, since this path is not in aiter_test.sh's pytest branch) still executes cases. tests/test_conv3d_ci_modes.py pins that behaviour, which is the right guard to have.
Approving on the test-scope question. Two notes already in my earlier comment, neither blocking: this file measures ~4s so the CI time saved is about nil, and the mode-switch test is the part most worth factoring out if this split gets applied to heavier files.
main gained #7331, which rewrote op_tests/test_flydsl_conv_implicit.py into ci/perf modes and added a 2d_splitk2 case asserting that split-K survives host resolution. Keep that file and re-home the gfx1250-only check inside it: the shared resolver assertions and the compile hook stay behind a gfx1250 guard, so the gfx950 CI path is untouched. No other file collides.
…rix to perf mode (ROCm#7331) The standard CI command runs this file with no arguments, so the complete Wan2.1/Qwen-Image performance matrix ran inside a shard: 109 benchmarked rows, each timing both torch and FlyDSL through 101 profiled iterations. On the Aiter Test run for 09b616c this one file took 603.193 s. Leave the shared runner, sharding and timing aggregation untouched and split the behaviour at this file's own entry point instead. With no arguments the script now runs a correctness-only suite: the six Wan families that cover the distinct kernel paths (conv_in at the real 368x544, so the exact production tuned row and the compile parameter it selects are both verified, the other five at 64x64), six keyword regressions for the reuse, gating and split-K paths, and the unfiltered compile-key isolation and static-extent checks. Each row does two warmups and ten directly checked calls, keeping the existing rtol=atol=2e-2 bar with zero mismatched elements and an explicit finiteness check. There is no profiler, no run_perftest and no torch performance baseline, so no throughput columns are reported for these rows. --mode perf keeps the previous matrix, resolutions, tables and statistics unchanged; the new manual workflow dispatches exactly that command. Add a manual-only MI35X workflow for the full sweep: it resolves the requested physical GPU through ROCm SMI unique ID and PCI address, refuses anything but gfx950, requires 30 s of idle time before starting, monitors for external processes and stops only its own container. Its logs are a separate artifact and never feed the standard timing table. Add pure-CPU regression tests for the argument/mode split, the direct-call runner and the host split-K and reuse plans; they import no torch, aiter or FlyDSL and need no GPU. Test plan: - python tests/test_conv3d_ci_modes.py (19 tests, stdlib unittest only) - black --check and ruff check on both Python files - YAML, Bash and embedded-Python syntax validation of the new workflow - python op_tests/test_flydsl_conv_implicit.py --help, confirming argument parsing happens before any backend import Measured wall-time comparison of the old and new default entry point on an idle gfx950 card is still pending; this commit makes no speedup claim.
PR Self-Review
Reviewed revision
a79f15cae5c905422c2838658845e2c37125768cBehavior and intent
op_tests/test_flydsl_conv_implicit.pyused to expose one behavior to everycaller: the full Wan2.1/Qwen-Image performance matrix — 109 rows, each timing both
torchand FlyDSL through 101 profiled iterations. The standard CI invokes thefile with no arguments, so that matrix ran on every MI35X shard that carried it,
even when the only question was whether the kernel still computes the right
answer. The default now runs correctness only: six Wan families (one at its real
368x544 so the production tuned row and the compile parameter it selects are both
verified), six keyword regressions for the reuse/gating/split-K branches, and the
unfiltered key-isolation and static-extent checks — 19 rows, two warmups and ten
checked calls each, no profiler and no
torchbaseline.--mode perfrestoresthe previous matrix unchanged for the manual workflow. No shared runner, sharding
script or timing helper is modified.
Validation and unverified scope
Validated on this branch on an MI350X
gfx950(physical GPU 0), ROCm 7.2.4 /torch 2.10.0 / FlyDSL 0.4.1, per-variant caches, idle gate and external-process
monitor active:
python op_tests/test_flydsl_conv_implicit.py(new default): 19 cases, 190checked iterations, 0 failures.
conv_inhit the exact production row —('gfx950', 256), tile(192, 96, 4, 1), wgm 1 — and the compile parameterused that tile.
37.484 s cold / 5.415 s warm.
python tests/test_conv3d_ci_modes.py: 19 CPU-only tests pass;black --checkand
ruff checkclean; the new workflow parses as YAML with 9 Bash blocks and3 embedded Python blocks.
linux-aiter-mi35x-1: run 41429134808 shard 0 isTest passedat 24.335 s; the same file before the change was run41382065915 shard 4 at 603.193 s.
Unverified:
--mode perfend to end on CI (only a two-case smoke locally,59.353 s); the new workflow has never been dispatched; nothing beyond the existing
early
SUPPORTED_GFXreturn was exercised on gfx942;BIG_IN/BIG_OUTlarge-address branches remain uncovered.
PR-specific question
Should this ci/perf split stay local to this file, or become the pattern for other
heavy op tests? 27 of 32
op_tests/test_flydsl_*.pycurrently run their perfsweep unconditionally. If other files follow, the mode/argument regression in
tests/test_conv3d_ci_modes.pyis worth factoring into a shared helper instead ofbeing copied per file.
Changed op tests
op_tests/test_flydsl_conv_implicit.py— the only op test whose behavior changed,and the entire point of the PR. Its default case set is chosen per kernel branch,
so it is not redundant with the full matrix: kW reuse with a partial B DMA round
(
2d_tile_256x96), three kH x kW reuse layouts (NHWC, NDHWC, dilation on W), thestride-2 path that must decline reuse, and a split-K case whose host resolution
genuinely keeps
splitk=2.tests/test_conv3d_ci_modes.pyis new supportingcoverage, not a replacement: it tests the mode/argument plumbing and the host plan
selection, and never executes a kernel.
Problem
op_tests/test_flydsl_conv_implicit.pyis executed by the standard CI with noarguments, and its default was the complete Wan2.1/Qwen-Image performance
matrix: 109 benchmarked rows, each timing both
torchand FlyDSL throughrun_perftest's 101 profiled iterations. On the Aiter Test run for09b616cthis single file took 603.193 s of a shard
(
standard-test-log-linux-aiter-mi35x-1-shard-4/latest_test.log).That cost is dominated by benchmark repetition and
torchbaselines, not bycorrectness coverage.
Change
The split is made inside this file's own entry point; no shared runner,
sharding script, workflow trigger or timing aggregation is modified, and the
no-argument CI command keeps working unchanged.
Default (
--mode ci, what CI runs)Correctness only, 19 rows:
conv_in,down_0_1,resample_96,time_conv_192,wdec_up_192_L0,wdec_conv_out.conv_inruns at the real368x544, which asserts that theexact production tuned row is hit (non-borrowed, device-matching) and that the
compile parameter actually uses the tile that row returned. The other five run
at compact
64x64with channel/filter/temporal/stride/padding semanticspreserved.
kW reuse with a partial B DMA round (
2d_tile_256x96), three kH x kW reusepaths (NHWC, NDHWC, dilation on W), the stride-2 case that must decline
reuse (
2d_block_rows8_gated_s2), and split-K.reuse.
Each row does two warmups and ten directly checked calls. The numerical bar is
unchanged:
rtol=atol=2e-2, zero mismatched elements, plus an explicitfiniteness check. No profiler, no
run_perftest, notorchperformancebaseline — so no throughput numbers are fabricated for these rows.
--mode perfThe previous matrix, resolutions, tables and statistics, unchanged: 29 keyword
cases, 48 Wan rows, 32 Qwen rows, key isolation and the static check.
Manual workflow
.github/workflows/conv3d-perf.yamldispatches--mode perfon an MI35Xrunner. It resolves the requested physical GPU via ROCm SMI unique ID and PCI
address, refuses anything that is not
gfx950and not exactly one visibledevice, requires 30 s of idle time before starting, samples for external
processes during the run and stops only its own labelled container. Logs go
to a separate
conv3d-perf-log-*artifact and never enter thestandard-test-log-*timing pipeline.Tests
tests/test_conv3d_ci_modes.py— 19 pure-CPU tests (stdlibunittest, notorch/aiter/FlyDSL import, no GPU): argument and mode selection, thedirect-call runner's warmup/iteration/failure accounting, tolerance argument order,
and AST-extracted host
split-K/kW/kH x kWplan assertions.Scope: why this file only
Most
op_tests/test_flydsl_*.pyrun correctness and their performance sweep inthe same standard-CI invocation: 27 of 32 call
perftest/run_perftestunconditionally, and only two expose any perf switch at all. The shard table
tolerates that —
test_flydsl_pa_decode.pyis budgeted 272 s andtest_flydsl_moe_gfx942.py237 s.This change targets the single most expensive entry rather than proposing a
repository-wide convention. At 603.193 s this file cost more than twice the next
heaviest flydsl test, and its own row in
.github/split-test-times/aiter.tsvstill said 4 s, so the shard splitter could not see the cost either. Nothing
here changes how any other test is invoked.
If maintainers would rather keep one invocation shape for every op test, the
alternative that adds no CLI mode is to shrink this file's default perf matrix
instead; that trades coverage of the tuned shapes for the same CI time.
Verification
python tests/test_conv3d_ci_modes.pyblack --check(both files)ruff check(both files)--helpbefore backend importMeasured results
Environment: MI350X
gfx950, physical GPU 0, ROCm 7.2.4 / torch 2.10.0,FlyDSL 0.4.1, caches isolated per variant, idle gate and external-process
monitor active for every run.
83476281a79f15cThe standard CI measured this file at 603.193 s before the change and
24.335 s after it, on
linux-aiter-mi35x-1shard 0 (Aiter Test run41429134808,
Test passed) — a 96.0% reduction in what CI actually pays.The cold baseline is dominated by first-time JIT: the old default compiled every
kernel its 109 benchmark rows needed (791.8 s cold against 36.8 s warm), while
the new default compiles 19.
Correctness in the new default: 19 cases, 190 checked iterations, 0 failed
cases.
conv_inhit the exact production tuned row — device('gfx950', 256),tile
(192, 96, 4, 1),wgm=1— and the compile parameter used that tile.The
Aiter Testshard-6 failure in that same run is unrelated: it is reported asThe self-hosted runner lost communication with the server, and that shard'sfile list does not contain this test.
Not covered
BIG_IN/BIG_OUTlarge-address branches are not exercised by thecompact default set, and the full matrix never guaranteed them either. A
separate boundary plan is needed.
The script also has an older
2d_splitk2case that silently degrades tosplit-K=1, because
CRS=864overTILE_K=32gives 27 K-tiles. This PR does notchange it; the default CI set instead asserts a case whose host resolution
genuinely keeps
splitk=2.