Skip to content

[FlyDSL] Add flyc.compile to skills. and cache HERD host launches - #7271

Merged
coderfeli merged 6 commits into
mainfrom
codex/flydsl-herd-compiled-dispatch
Nov 5, 2026
Merged

coderfeli merged 6 commits into
mainfrom
codex/flydsl-herd-compiled-dispatch

Conversation

@coderfeli

@coderfeli coderfeli commented Nov 1, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Dispatch HERD (herd_route_psum_remap) through tensor_shim._run_compiled so warmed calls use the cached CompiledFunction instead of re-entering JIT dispatch, and delete the dead flydsl_batched_gemm_mxfp4 wrapper.

Changes

  • HERD: wrap the _get_compiled_route_psum_herd(topk, has_num_valid_rows) launcher in _run_compiled. The factory already fixes the config per launcher, so no specialization_key is needed. The stream is passed positionally.
  • batched_gemm_mxfp4.py: remove flydsl_batched_gemm_mxfp4 and _run_gfx1250. Neither path can run: the gfx950 branch imports the removed kernels.mxfp4_preshuffle module, and the gfx1250 branch passes arguments that no longer match launch_gemm_a8w4_tdm. Nothing in the tree calls it. flydsl_batched_gemm_a8w4_v2 and its prep helpers are unchanged.
  • Cleanup skill: one bullet on wrapping cached JitFunction factories in _run_compiled.

Performance

HERD wrapper CPU submission time (not GPU kernel time), gfx950, FlyDSL 0.4.1, median of 7×200 warmed calls:

Hardware Workload/configuration Before After Change
gfx950 E=128, K=4, tokens=1 77.22 us 23.07 us -70.1%
gfx950 E=128, K=4, tokens=16 75.87 us 22.61 us -70.2%
gfx950 E=128, K=4, tokens=128 76.24 us 22.59 us -70.4%
gfx950 E=256, K=6, tokens=1 76.62 us 22.84 us -70.2%
gfx950 E=256, K=6, tokens=16 77.15 us 22.59 us -70.7%
gfx950 E=256, K=6, tokens=128 77.12 us 23.01 us -70.2%
gfx950 E=512, K=16, tokens=1 77.21 us 23.11 us -70.1%
gfx950 E=512, K=16, tokens=16 77.70 us 22.94 us -70.5%
gfx950 E=512, K=16, tokens=128 77.57 us 23.23 us -70.1%

Testing

  • op_tests/test_flydsl_herd.py: 34 passed, 40 skipped (gfx950, FlyDSL 0.4.1, clean cache)
  • op_tests/test_flydsl_batched_gemm.py still imports (it only uses the v2 entry point)

🤖 Generated with Claude Code

@coderfeli
coderfeli requested a review from a team November 1, 2026 10:14
@github-actions

github-actions Bot commented Nov 1, 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 7271 --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 added the FlyDSL label Nov 1, 2026
@aiter-bot

aiter-bot commented Nov 1, 2026 •

Copy link
Copy Markdown

NOT READY FOR HUMAN REVIEW

PR Self-Review

Revision ce57cc5d16bb · mode shadow

Waiting for the PR author. The readiness report will appear after the self-review answers are complete for this revision.

Questions to answer in the PR description

  1. What behavior does this PR change, and why is the existing behavior insufficient?
  2. What did you validate, and what remains unverified? Include commands, hardware/configuration and results.
  3. What is the most important boundary or failure mode introduced by this change, and what evidence covers it?
  4. For every changed op_tests/ file, what behavior does it cover and why is it not redundant? Write None if no op test changed.

Edit the PR Self-Review section in the PR description. Include the current revision SHA; this comment refreshes automatically.

Missing or invalid answers

  • FAIL — missing ### Reviewed revision in the PR description
  • FAIL — missing ### Behavior and intent in the PR description
  • FAIL — missing ### Validation and unverified scope in the PR description
  • FAIL — missing ### PR-specific question in the PR description
  • FAIL — missing ### Changed op tests in the PR description
  • FAIL — Reviewed revision must contain at least the first 7 characters of the current head SHA
  • FAIL — Behavior and intent has no substantive answer
  • FAIL — Validation and unverified scope has no substantive answer
  • FAIL — PR-specific question has no substantive answer

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 requested a review from yadaish November 2, 2026 01:18
@coderfeli coderfeli changed the title [FlyDSL] Cache HERD host launches and retire legacy BMM entry points [FlyDSL] Cache HERD and batched GEMM host launches Nov 2, 2026
@coderfeli coderfeli changed the title [FlyDSL] Cache HERD and batched GEMM host launches [FlyDSL] Add flyc.compile to skills. and cache HERD host launches Nov 2, 2026
coderfeli and others added 3 commits November 2, 2026 08:29
The legacy wrapper is unreachable: its gfx950 branch imports the removed
kernels.mxfp4_preshuffle module and its gfx1250 branch no longer matches
launch_gemm_a8w4_tdm's signature. Delete it with _run_gfx1250 and the
tensor-ABI key helper instead of caching it. Only flydsl_batched_gemm_a8w4_v2
remains (already on _run_compiled with a Constexpr-only key).

Reduce the skill changes to one cleanup-skill bullet.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Resolve batched_gemm_mxfp4.py: keep the dead-wrapper removal and carry
#6767's gfx1250-strict gate onto flydsl_batched_gemm_a8w4_v2. Pass HERD's
stream via current_stream_arg() to match #7219.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@coderfeli
coderfeli merged commit 790fae1 into main Nov 5, 2026
@coderfeli
coderfeli deleted the codex/flydsl-herd-compiled-dispatch branch November 5, 2026 05:37
charlieguo1106 added a commit that referenced this pull request Nov 5, 2026
Resolve grouped_moe_gfx1250.py: keep the removal of herd_route_psum_remap,
which herd_route_psum replaces at every expert count, and carry #7271's
dispatch onto it: herd_route_psum launches through _run_compiled, so warmed
calls take the cached CompiledFunction, and passes current_stream_arg().
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants