Skip to content

[FlyDSL] [CI] Conv3d: default to representative Wan correctness, move full matrix to perf mode - #7331

Merged
zufayu merged 1 commit into
ROCm:mainfrom
huizzhan:conv3d-ci-representative-correctness
Nov 3, 2026
Merged

zufayu merged 1 commit into
ROCm:mainfrom
huizzhan:conv3d-ci-representative-correctness

Conversation

@huizzhan

@huizzhan huizzhan commented Nov 2, 2026 •

Copy link
Copy Markdown
Contributor

PR Self-Review

Reviewed revision

a79f15cae5c905422c2838658845e2c37125768c

Behavior and intent

op_tests/test_flydsl_conv_implicit.py used to expose one behavior to every
caller: the full Wan2.1/Qwen-Image performance matrix — 109 rows, each timing both
torch and FlyDSL through 101 profiled iterations. The standard CI invokes the
file 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 torch baseline. --mode perf restores
the 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, 190
    checked iterations, 0 failures. conv_in hit the exact production row —
    ('gfx950', 256), tile (192, 96, 4, 1), wgm 1 — and the compile parameter
    used that tile.
  • Same file before the change, same card: 791.792 s cold / 36.839 s warm. After:
    37.484 s cold / 5.415 s warm.
  • python tests/test_conv3d_ci_modes.py: 19 CPU-only tests pass; black --check
    and ruff check clean; the new workflow parses as YAML with 9 Bash blocks and
    3 embedded Python blocks.
  • CI, like-for-like on linux-aiter-mi35x-1: run 41429134808 shard 0 is
    Test passed at 24.335 s; the same file before the change was run
    41382065915 shard 4 at 603.193 s.

Unverified: --mode perf end 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_GFX return was exercised on gfx942; BIG_IN/BIG_OUT
large-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_*.py currently run their perf
sweep unconditionally. If other files follow, the mode/argument regression in
tests/test_conv3d_ci_modes.py is worth factoring into a shared helper instead of
being 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), the
stride-2 path that must decline reuse, and a split-K case whose host resolution
genuinely keeps splitk=2. tests/test_conv3d_ci_modes.py is new supporting
coverage, 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.py is executed by the standard CI with no
arguments, and its default was the complete Wan2.1/Qwen-Image performance
matrix: 109 benchmarked rows, each timing both torch and FlyDSL through
run_perftest's 101 profiled iterations. On the Aiter Test run for 09b616c
this 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 torch baselines, not by
correctness 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:

  • Six Wan families covering the distinct kernel paths — conv_in,
    down_0_1, resample_96, time_conv_192, wdec_up_192_L0,
    wdec_conv_out. conv_in runs at the real 368x544, which asserts that the
    exact 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 64x64 with channel/filter/temporal/stride/padding semantics
    preserved.
  • Six keyword regressions for the branches the recent kernel work added:
    kW reuse with a partial B DMA round (2d_tile_256x96), three kH x kW reuse
    paths (NHWC, NDHWC, dilation on W), the stride-2 case that must decline
    reuse (2d_block_rows8_gated_s2), and split-K.
  • Unfiltered compile-key isolation (6 shapes) and static-extent kH x kW
    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 explicit
finiteness check. No profiler, no run_perftest, no torch performance
baseline — so no throughput numbers are fabricated for these rows.

--mode perf

The 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.yaml dispatches --mode perf on an MI35X
runner. It resolves the requested physical GPU via ROCm SMI unique ID and PCI
address, refuses anything that is not gfx950 and not exactly one visible
device, 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 the
standard-test-log-* timing pipeline.

Tests

tests/test_conv3d_ci_modes.py — 19 pure-CPU tests (stdlib unittest, no
torch/aiter/FlyDSL import, no GPU): argument and mode selection, the
direct-call runner's warmup/iteration/failure accounting, tolerance argument order,
and AST-extracted host split-K/kW/kH x kW plan assertions.

Scope: why this file only

Most op_tests/test_flydsl_*.py run correctness and their performance sweep in
the same standard-CI invocation: 27 of 32 call perftest/run_perftest
unconditionally, and only two expose any perf switch at all. The shard table
tolerates that — test_flydsl_pa_decode.py is budgeted 272 s and
test_flydsl_moe_gfx942.py 237 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.tsv
still 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

Check Result
python tests/test_conv3d_ci_modes.py 19 tests OK (0.03 s, CPU only)
black --check (both files) clean
ruff check (both files) clean
workflow YAML + 9 Bash blocks + 3 embedded-Python blocks parse OK
--help before backend import verified by test

Measured 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.

Scenario Before 83476281 After a79f15c Change
Cold caches 791.792 s 37.484 s −95.3%
Warm caches 36.839 s 5.415 s −85.3%

The standard CI measured this file at 603.193 s before the change and
24.335 s after it, on linux-aiter-mi35x-1 shard 0 (Aiter Test run
41429134808, 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_in hit the exact production tuned row — device ('gfx950', 256),
tile (192, 96, 4, 1), wgm=1 — and the compile parameter used that tile.

The Aiter Test shard-6 failure in that same run is unrelated: it is reported as
The self-hosted runner lost communication with the server, and that shard's
file list does not contain this test.

Not covered

  • The BIG_IN/BIG_OUT large-address branches are not exercised by the
    compact default set, and the full matrix never guaranteed them either. A
    separate boundary plan is needed.
    The script also has an older 2d_splitk2 case that silently degrades to
    split-K=1, because CRS=864 over TILE_K=32 gives 27 K-tiles. This PR does not
    change it; the default CI set instead asserts a case whose host resolution
    genuinely keeps splitk=2.

…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.
@huizzhan
huizzhan requested a review from a team November 2, 2026 10:28
@github-actions

github-actions Bot commented Nov 2, 2026

Copy link
Copy Markdown
Contributor

🏷️ CI Guide

Runs automatically on every PR:

  • ✅ Pre-checks (submodule verification, code formatting)
  • ✅ Aiter op tests (gfx942 + gfx950)
  • ✅ Triton tests on MI35X (only when aiter/ops/triton/** or related paths are changed)

Extended tests (opt-in via labels):

Label Tests
ci:gfx1250-ffm-triton Run the five-shard gfx1250 FFM Triton test suite
ci:triton-300x Run an additional Triton test job on MI300X in PRs (added automatically when gfx942 configs change); main branch always runs both MI35X and MI300X
ci:triton-355 Run the full Triton test suite on MI35X, not only the tests the change affects
ci:windows Windows JIT op smoke test on the gfx1201 ROCm runner
ci:multi-gpu Aiter multi-GPU tests on the 8-GPU runner
ci:sglang SGLang integration tests: DeepSeek-R1-MXFP4 accuracy, Qwen 3.5 accuracy
ci:atom ATOM benchmark: DeepSeek-R1-0528, GPT-OSS-120B
ci:atom_full ATOM accuracy suite for PR and main models from ATOM models_accuracy.json
ci:vllm vLLM benchmark: DeepSeek-V4-Pro, MiniMax-M3-MXFP4
ci:all All standard extended tests (excludes ci:atom_full)

Only add ci:atom_full for FlyDSL or Triton upgrades.
Add labels via the sidebar or gh pr edit 7331 --add-label <label>

One backend per PR:
A PR changes one kernel backend: [Triton/Gluon] (Triton and Gluon count as one), [HIP], [ASM], [CK], [OPUS] or [FlyDSL]. If the title ends up with two backend tags, split the PR -- as stacked pull requests when one part cannot merge without the other.

PR title tags & labels:
Component tags ([Triton/Gluon], [HIP], [CK], [ASM], ...) are added to the PR title and as PR labels automatically from the changed files and re-synced on every push — change-type tags like [fix]/[Perf], op tags like [MLA], and human labels (ci:*) are left untouched. Add the no-auto-title label to stop the title rewrites; labels stay in sync either way.

@github-actions github-actions Bot changed the title [CI] Conv3d: default to representative Wan correctness, move full matrix to perf mode [FlyDSL] [CI] Conv3d: default to representative Wan correctness, move full matrix to perf mode Nov 2, 2026
@aiter-bot

aiter-bot commented Nov 2, 2026 •

Copy link
Copy Markdown

READY FOR HUMAN REVIEW

PR Self-Review

Revision a79f15cae5c9 · mode shadow

Author self-review accepted. Readiness report:

Author answers

  • PASS — current-SHA answers are present and structurally specific
Show the author's self-review answers

Behavior and intent

`op_tests/test_flydsl_conv_implicit.py` used to expose one behavior to every
caller: the full Wan2.1/Qwen-Image performance matrix — 109 rows, each timing both
`torch` and FlyDSL through 101 profiled iterations. The standard CI invokes the
file 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 `torch` baseline. `--mode perf` restores
the 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, 190
  checked iterations, 0 failures. `conv_in` hit the exact production row —
  `('gfx950', 256)`, tile `(192, 96, 4, 1)`, wgm 1 — and the compile parameter
  used that tile.
- Same file before the change, same card: 791.792 s cold / 36.839 s warm. After:
  37.484 s cold / 5.415 s warm.
- `python tests/test_conv3d_ci_modes.py`: 19 CPU-only tests pass; `black --check`
  and `ruff check` clean; the new workflow parses as YAML with 9 Bash blocks and
  3 embedded Python blocks.
- CI, like-for-like on `linux-aiter-mi35x-1`: run 41429134808 shard 0 is
  `Test passed` at **24.335 s**; the same file before the change was run
  41382065915 shard 4 at **603.193 s**.

**Unverified:** `--mode perf` end 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_GFX` return was exercised on gfx942; `BIG_IN`/`BIG_OUT`
large-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_*.py` currently run their perf
sweep unconditionally. If other files follow, the mode/argument regression in
`tests/test_conv3d_ci_modes.py` is worth factoring into a shared helper instead of
being 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), the
stride-2 path that must decline reuse, and a split-K case whose host resolution
genuinely keeps `splitk=2`. `tests/test_conv3d_ci_modes.py` is new supporting
coverage, not a replacement: it tests the mode/argument plumbing and the host plan
selection, and never executes a kernel.

PR state

  • PASS — pull request is marked ready for review

Copilot findings

  • PASS — no active Copilot finding lacks a substantive author reply
  • ADVISORY — Copilot did not review the current head SHA

Code and op-test hygiene

  • PASS — no committed artifact or conflict marker detected

Required CI

  • PASS — Black: passed
  • PASS — Ruff: passed
  • PASS — Repository dependency: passed
  • PASS — Aiter Test Gate: passed

Shadow mode reports what would block but keeps the status successful. Set AITER_PR_SELF_REVIEW_MODE=enforce only after reviewing real false positives.

@zufayu

zufayu commented Nov 3, 2026

Copy link
Copy Markdown
Contributor

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 main runs:

run 41372363913  3.957s
run 41355396602  4.048s
run 41246683187  3.989s

.github/split-test-times/aiter.tsv records it at 10s, so even that is an over-estimate. For scale, import torch plus import aiter measures 3.5s on a warm cache, so almost all of those 4 seconds are the interpreter starting up. The CI time this saves is about zero.

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:

file recorded
op_tests/test_flydsl_pa_decode.py 272s
op_tests/test_flydsl_moe_gfx942.py 237s
op_tests/test_gated_delta_rule.py 200s
op_tests/test_flydsl_mega_mhc.py 164s
op_tests/test_flydsl_moe_aux.py 150s

Those five come to 1023s against this file's 4s, and test_gated_delta_rule is the GDN path you have already worked in.

Suggestion on tests/test_conv3d_ci_modes.py: those 545 lines are the most reusable part of this PR. A default path that can return 0 without running a case is exactly the failure mode this guards against, and it is not hypothetical — main already has files where python3 <file> exits 0 having collected nothing (test_gemm_group32_interface.py, test_all2all_manager_lifecycle.py, test_concat_cache_mla_seg.py, test_moe_local_expert_ids.py, all recorded at 4s, all with real cases under pytest). If the ci/perf split is going to be applied to more files, it would be worth factoring that check into something shared rather than copying 545 lines per file.

Worth double-checking for this file specifically: aiter_test.sh runs python3 <file> unless the path is in its pytest branch, and this one is not, so --mode ci has to execute cases from __main__ for the default CI run to test anything.

@huizzhan

huizzhan commented Nov 3, 2026

Copy link
Copy Markdown
Contributor Author

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:

standard-test-log-linux-aiter-oci-mi300x-1-shard-4/latest_test.log
[aiter] flydsl_conv_implicit unsupported on gfx942; skipping
⏱ Time elapsed of op_tests/test_flydsl_conv_implicit.py: 3.957 seconds

The eight linux-aiter-mi35x-1 shards of that same run do not carry the file at
all, so the MI300X skip was the only sample available. That is also where the
4 s/10 s in .github/split-test-times/aiter.tsv comes from: the updater mixes
MI300X skip samples with MI35X execution samples and takes a median, so the table
understates the MI35X cost by two orders of magnitude.

Like-for-like on linux-aiter-mi35x-1, where the kernel actually runs:

run shard elapsed
before 41382065915 4 603.193 s (Test passed)
after (this PR) 41429134808 0 24.335 s (Test passed)

Local A/B on one idle MI350X, per-variant caches, idle gate and external-process
monitor: 791.792 s -> 37.484 s cold, 36.839 s -> 5.415 s warm. The cold baseline
is almost entirely first-time JIT of the kernels the 109 benchmark rows needed.

You are right that the saving on a 4 s gfx942 skip is exactly zero — that path
returns at SUPPORTED_GFX before mode dispatch, and this PR does not change it.
The claim is about the MI35X execution path only.

On the suggestion: agreed, the mode/argument regression is the reusable part, and
I would rather factor it into a shared helper than copy 545 lines per file — noted
as the follow-up if the split is applied to the heavier files (pa_decode,
moe_gfx942, mega_mhc, moe_aux, gated_delta_rule). Also confirmed:
aiter_test.sh runs this file as python3 <file> without a pytest branch, so
--mode ci executes from __main__; the CI run above is that path.

@zufayu zufayu left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@zufayu
zufayu merged commit 79e200c into ROCm:main Nov 3, 2026
huizzhan added a commit that referenced this pull request Nov 3, 2026
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.
shantipriya-amd pushed a commit to shantipriya-amd/aiter that referenced this pull request Nov 18, 2026
…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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants