vllm.models.deepseek_v41.amd.akr_config
¶
Which DeepSeek-V4.1-Flash routes run amd_kernels (kernel_config.amd_kernels).
A route is on when amd_kernels imports on ROCm gfx950, the route is not in
disabled_routes and its prerequisite routes are on. Per call, serves(route, m)
also needs m inside the route's row range (GATES), where m is the static
(captured, padded) token count of the call, so a captured shape takes one branch.
A collective route (fused_ep8) passes dp_rows(m), the DP-group maximum, so
that every rank takes the same branch. The amd_kernels op entries stay the
authority on shapes: each call also asks the entry, and a declined call runs the
stock kernel.
Functions:
-
dp_rows–The DP-group maximum token count of this step (
moutside a forward -
fail–Take
routeout for the rest of the process. Only called at load time, -
indexer_bound–Longest row of an indexer layer in compressed entries.
-
indexer_rows_ok–Candidate consumers always run the kernel; dense layers with a long bound
-
on–Whether
routeis on in this process (any row count). -
quant_activation–MXFP8 codes and row-major E8M0 scales as the activation stock linears take.
-
routes–The routes on in this process, read from the current vLLM config at the
-
serves–Whether
routeis on andmrows are inside its row range. -
takes_mxfp8_codes–Whether a stock linear reads row-major MXFP8 codes and E8M0 scales as
dp_rows(m)
¶
The DP-group maximum token count of this step (m outside a forward
context or without DP).
Source code in vllm/models/deepseek_v41/amd/akr_config.py
fail(route, reason)
¶
Take route out for the rest of the process. Only called at load time,
before CUDA graph capture fixes the branches.
Source code in vllm/models/deepseek_v41/amd/akr_config.py
indexer_bound(max_model_len, compress_ratio, override=0)
¶
Longest row of an indexer layer in compressed entries.
indexer_rows_ok(bound, rows, candidate_consumer)
¶
Candidate consumers always run the kernel; dense layers with a long bound
only from INDEXER_LONG_MIN_ROWS decode rows.
Source code in vllm/models/deepseek_v41/amd/akr_config.py
on(route)
¶
quant_activation(codes, scale, orig_dtype)
¶
MXFP8 codes and row-major E8M0 scales as the activation stock linears take.
Source code in vllm/models/deepseek_v41/amd/akr_config.py
routes()
¶
The routes on in this process, read from the current vLLM config at the first call under one (model build) and kept.
Source code in vllm/models/deepseek_v41/amd/akr_config.py
serves(route, m)
¶
takes_mxfp8_codes(linear)
¶
Whether a stock linear reads row-major MXFP8 codes and E8M0 scales as they are (FlashInfer kernels use the same key with swizzled scales).