Skip to content

perf(mono): reuse AITER compiled FlyDSL dispatch - #2741

Merged
valarLip merged 1 commit into
mainfrom
fix/mono-compiled-launchers
Oct 28, 2026
Merged

valarLip merged 1 commit into
mainfrom
fix/mono-compiled-launchers

Conversation

@coderfeli

@coderfeli coderfeli commented Oct 27, 2026 •

Copy link
Copy Markdown
Collaborator

Mono decode runners retain JIT launchers after compile-only preparation, so every step still enters FlyDSL's JIT dispatch. Route execution through AITER's existing _run_compiled: the first real warmup launch compiles and executes once, then subsequent calls use its retained CompiledFunction with fresh runtime addresses, scalars and stream.

Reuse aiter.ops.flydsl.kernels.tensor_shim directly, without adding a local cache class or changing atom/mono/runtime/compile.py. Keep the original JIT objects for ABI and binary-resource inspection. DeepSeek V4's deferred compile hints stay unchanged. Kimi debug launchers are retained by build key so they also reuse compiled dispatch.

This covers DeepSeek V4/V4.1, GLM-5.2, Kimi-K3, MiniMax M3 sparse/dense paths and step-begin. The stream is passed positionally, matching AITER and CompiledFunction. Warm-cache compile-only handling comes from current AITER main (ROCm/aiter#6946, commit 2bafed472).

Validation:

  • 280 existing runtime, plan and model regression tests passed. No test files are added or changed.
  • Local GPU validation passed for no-dispatch preload, single warmup execution, changed addresses/scalars/streams, warm compile-only, JIT bypass, and graph capture/replay.
  • Ruff, Black and git diff --check passed; the vendored GLM op retains its existing formatter exemption.

Launch overhead was measured in eager mode with CUDA Graph disabled (no capture or replay), using a warmed no-op FlyDSL launcher and the shared AITER dispatch path.

Dispatch path Median host launch overhead (us/launch)
JIT dispatch via JitFunction 15.31
Cached dispatch via AITER _run_compiled 2.75

Cached dispatch saves 12.56 us per launch (82.0% lower host launch overhead).

Method: 40 alternating batches of 100 warm launches per path; GPU synchronization occurs outside the timed batches. Compilation and warmup are excluded. These figures measure steady-state host dispatch overhead; full-model latency and serving throughput were not measured.

Validation used the local FlyDSL MLIR build and a clean source snapshot of AITER main at 2bafed472. Full-model accuracy and serving throughput comparisons were not run locally.

@github-actions

Copy link
Copy Markdown
Contributor

🏷️ CI Guide

Runs automatically on every eligible PR before approval:

  • ✅ Pre Checkin: Black, Ruff, catalog schema validation, non-GPU unit tests

Heavy model tests:

  • ✅ Run after the PR is approved and Pre Checkin passes
  • ✅ Run immediately when an approval review is submitted
  • ✅ Can be requested before approval with labels
Label Tests
ci:full Run all heavy PR model tests: native ATOM, vLLM, and SGLang
ci:atom Run native ATOM model accuracy tests
ci:vllm Run ATOM vLLM OOT model accuracy tests
ci:sglang Run ATOM SGLang model accuracy tests

Heavy jobs are skipped when the PR is not approved and no matching ci:* label is present.
Add labels via the sidebar or gh pr edit 2741 --add-label <label>

valarLip
valarLip previously approved these changes Oct 27, 2026
@coderfeli
coderfeli force-pushed the fix/mono-compiled-launchers branch from 8e8b7ad to 719bdab Compare October 27, 2026 07:07
@coderfeli coderfeli changed the title perf(mono): reuse compiled FlyDSL launchers after warmup perf(mono): reuse AITER compiled FlyDSL dispatch Oct 27, 2026
@coderfeli
coderfeli requested a review from valarLip October 27, 2026 14:48
@valarLip
valarLip merged commit f327245 into main Oct 28, 2026
44 of 45 checks passed
@valarLip
valarLip deleted the fix/mono-compiled-launchers branch October 28, 2026 12:40
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.

2 participants