vllm.models.deepseek_v41.amd.mono.attention.plan
¶
Geometry of the DeepSeek-V4.1 attention mega kernel: model widths, a TP rank's share of them, task counts and the scratch (mailbox) layout.
Classes:
-
Dims–
Functions:
-
ardy_tiles–Token tiles wo_a publishes ready flags for (1: one flag a task).
-
back_scratch–K2's scratch regions, laid out past
start: published data (plain) -
flag_copy–The first pair of the flag copy CTA
bidpolls (generic: 0). -
flag_stride–Pairs a copy of an n-flag region: whole 128 B lines.
-
front_end–Where K2's regions start: past K1's, which share the launch tag.
-
front_scratch–K1's scratch regions -> (byte offset, bytes): published data (plain
-
on_copy–Flag
iof the copy at paircopy(flag_copy).
Dims
dataclass
¶
Attributes:
-
group_k(int) –wo_a's K a group: its eight heads' outputs.
-
head_tiles(int) –16-head MFMA tiles a rank: TP8's 8 heads take one, half of it
-
heads_pad(int) –The heads the split stage's LDS and MFMAs hold: whole head tiles.
Source code in vllm/models/deepseek_v41/amd/mono/attention/plan.py
group_k
property
¶
wo_a's K a group: its eight heads' outputs.
head_tiles
property
¶
16-head MFMA tiles a rank: TP8's 8 heads take one, half of it
padding (heads_pad).
heads_pad
property
¶
The heads the split stage's LDS and MFMAs hold: whole head tiles. The padded heads' columns are computed (each head is its own score maximum and its own PV column) but never stored.
ardy_tiles(s, tuned=False)
¶
Token tiles wo_a publishes ready flags for (1: one flag a task).
Source code in vllm/models/deepseek_v41/amd/mono/attention/plan.py
back_scratch(s, d, start=0, tuned=False)
¶
K2's scratch regions, laid out past start: published data (plain)
and flag pairs (tuned: the polled flags' copies).
Source code in vllm/models/deepseek_v41/amd/mono/attention/plan.py
flag_copy(c, bid, stride)
¶
flag_stride(n)
¶
front_end(s, d)
¶
Where K2's regions start: past K1's, which share the launch tag.
front_scratch(s, d, tuned=False)
¶
K1's scratch regions -> (byte offset, bytes): published data (plain
words behind a flag) and mailbox pairs (tuned: the polled flags'
copies).