vllm.models.deepseek_v41.amd.akr_warmup
¶
Prefill-size JIT warm-up for DeepSeek-V4.1 with amd_kernels routes on.
FlyDSL 0.5 traces a kernel variant before it looks up the on-disk artifact, so the first launch of every variant in a process costs 0.3-7 s even with a warm cache. Startup only runs the captured decode sizes and one profile step, so the variants only prefill-sized steps select (AITER's MXFP8 GEMMs per tuned M bucket, batched GEMMs, MegaMoE stages, top-k) were traced while serving: one rank stalls for seconds and, the DP ranks being in lockstep, all of them wait. On a fresh DEP8 server that was 289 rank-seconds of tracing in the first five minutes.
prefill_warmup runs from kernel_warmup, after the KV cache exists and before
graph capture:
1. each distinct linear layer (target and draft) runs its quant_method.apply at
one token count per AITER tuned-GEMM bucket above the captured sizes, and so
does the grouped wo_a; no collectives, so each rank runs it on its own;
2. whole-model dummy steps at a few prefill sizes, the same on every rank.
reserve_serving_transient (same call site) floors the torch growth the
extensible KV cache keeps free at amd_kernels.serving_transient_gib. Its
sizing steps measured 10.65 GiB of growth with the routes on (stock 14.55),
which left 17.5 GiB after sizing; a DEP8 step with a 32k-token prefill chunk
beside 96 decodes reached 16.7 GiB (8 GiB of it reserved but unallocated) and
failed to allocate wq_b's 2 GiB output.
Functions:
-
gemm_sizes–One token count per AITER tuned-GEMM bucket in (floor, max_m].
_linear_groups(models)
¶
One linear layer per distinct quant method and weight geometry.
Source code in vllm/models/deepseek_v41/amd/akr_warmup.py
_warm_wo_a(models, sizes, device)
¶
The stock grouped MXFP8 wo_a is not a LinearBase.apply.
Source code in vllm/models/deepseek_v41/amd/akr_warmup.py
gemm_sizes(max_m, floor)
¶
One token count per AITER tuned-GEMM bucket in (floor, max_m].