vllm.v1.attention.backends.mla.rocm_flydsl_mxfp4_indexer
¶
Indexer metadata for DeepSeek V4's ROCm MXFP4 indexer on aiter FlyDSL.
Opt-in with VLLM_ROCM_USE_AITER_FLYDSL_MXFP4_INDEXER=1 next to
indexer_kv_dtype="mxfp4". The K cache is written by vLLM's fused
compress -> RMSNorm -> RoPE -> MXFP4 -> insert kernel in the page layout of
aiter's FlyDSL pa_mqa_logits_fp4* scorers, which read it in place. The
builder plans each prefill chunk's row windows and the scorers' CTA
schedules once per step, so every indexer layer of the group reuses them.
Classes:
-
RocmFlyDslIndexerMetadata– -
RocmFlyDslIndexerMetadataBuilder–Dense indexer metadata plus the FlyDSL scorers' windows and schedules.
-
RocmFlyDslPrefillPlan–One prefill chunk as the FlyDSL prefill scorer launches it.
Functions:
-
aiter_flydsl_mxfp4_available–Whether the installed aiter has the stride-capable FlyDSL FP4 scorers
-
build_prefill_windows–(request, first key, end key) of each of a chunk's rows, keys local to
-
rocm_flydsl_mxfp4_indexer_enabled–Whether DeepSeek V4's MXFP4 indexer runs on aiter's FlyDSL scorers.
RocmFlyDslIndexerMetadata
dataclass
¶
Bases: DeepseekV32IndexerMetadata
Attributes:
-
decode_cta_info(Tensor | None) –A view of builder-owned storage, refreshed before each graph replay.
-
prefill_logits(Tensor | None) –Builder-owned fp32 storage for the widest scored chunk's logits.
-
prefill_plans(list[RocmFlyDslPrefillPlan]) –Parallel to
prefill.chunks.
Source code in vllm/v1/attention/backends/mla/rocm_flydsl_mxfp4_indexer.py
decode_cta_info = None
class-attribute
instance-attribute
¶
A view of builder-owned storage, refreshed before each graph replay.
prefill_logits = None
class-attribute
instance-attribute
¶
Builder-owned fp32 storage for the widest scored chunk's logits.
prefill_plans = field(default_factory=list)
class-attribute
instance-attribute
¶
Parallel to prefill.chunks.
RocmFlyDslIndexerMetadataBuilder
¶
Bases: DeepseekV32IndexerMetadataBuilder
Dense indexer metadata plus the FlyDSL scorers' windows and schedules.
Decode rows are flattened, one per query token, so speculative rows get their own causal bound before the C4 division.
Source code in vllm/v1/attention/backends/mla/rocm_flydsl_mxfp4_indexer.py
229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 | |
RocmFlyDslPrefillPlan
dataclass
¶
One prefill chunk as the FlyDSL prefill scorer launches it.
Attributes:
-
cta_info(Tensor | None) –The scorer's work schedule; None when every row keeps its whole
-
width(int) –Logits columns: the chunk's widest compressed context.
-
windows(tuple[Tensor, Tensor, Tensor]) –[rows] int32 request, first key and end key of each row.
Source code in vllm/v1/attention/backends/mla/rocm_flydsl_mxfp4_indexer.py
cta_info = None
class-attribute
instance-attribute
¶
The scorer's work schedule; None when every row keeps its whole context because the chunk is no wider than the top-k.
width
instance-attribute
¶
Logits columns: the chunk's widest compressed context.
windows
instance-attribute
¶
[rows] int32 request, first key and end key of each row.
aiter_flydsl_mxfp4_available()
cached
¶
Whether the installed aiter has the stride-capable FlyDSL FP4 scorers and the schedule builders this path calls.
Source code in vllm/v1/attention/backends/mla/rocm_flydsl_mxfp4_indexer.py
build_prefill_windows(query_start_loc, row_starts, row_ends, rows, num_reqs, query_offset)
¶
(request, first key, end key) of each of a chunk's rows, keys local to the request.
query_start_loc holds the chunk's request row offsets from 0, and
query_offset is the chunk's first row within them, nonzero when a
request is split on its query rows.
Source code in vllm/v1/attention/backends/mla/rocm_flydsl_mxfp4_indexer.py
rocm_flydsl_mxfp4_indexer_enabled(vllm_config)
¶
Whether DeepSeek V4's MXFP4 indexer runs on aiter's FlyDSL scorers.
Requires the opt-in flag on a DeepSeek-V4 model with the MXFP4 indexer cache. Without the FlyDSL interfaces it warns and the model keeps aiter's Triton paged MXFP4 indexer.