vllm.v1.attention.ops.flydsl_ultraquant_decode
¶
FlyDSL launcher for the optimized UltraQuant 4-bit D=256 decode kernel.
The production kernel uses scaled FP4×E4M3 QK MFMA, native V conversion, query hoisting, in-kernel Walsh-Hadamard rotation for GQA-6/8/16, and strided tile-group scheduling. These choices are fixed and are not environment-tunable.
Functions:
-
flydsl_ultraquant_decode_attention–Launch the optimized FlyDSL UltraQuant D=256 decode.
-
is_ultraquant_flydsl_available–Return whether the gfx950 UltraQuant FlyDSL kernel can be loaded.
-
ultraquant_flydsl_decode_eligible–Return whether decode should use the gfx950 FlyDSL kernel.
_SegmBufPool
¶
Single-bucket buffer pool for segm_out/segm_max/segm_sum/output + the
pooled Q-rotation intermediates. Identical to the TQ pool except that
ultraquant needs an extra q_fp8 (float8_e4m3fn) slot for the Q precision
haircut (q_rot_fp32 -> fp8_e4m3 -> bf16) so that no fresh allocation
lands in the HIP graph memory pool post-capture.
_fp4_value_lut(device)
¶
Return the fixed 16-entry FP4 E2M1 value table as fp32 [16] on device.
Indexed by the stored 4-bit E2M1 code, so lut[nibble] is the dequant
value directly (matches format.FP4_BITS_TO_VALUE).
_run_fused_q_rot(query, PiT_used, out, B, Hq, D, haircut)
¶
Launch the fused prologue. out is the pooled [B_bucket, Hq, D] buf.
flydsl_ultraquant_decode_attention(query, kv_cache, block_table, seq_lens, scale, PiT=None, max_seq_len=0, output_buf=None, buf_holder=None, max_num_kv_splits=32, sinks=None)
¶
Launch the optimized FlyDSL UltraQuant D=256 decode.
is_ultraquant_flydsl_available()
¶
Return whether the gfx950 UltraQuant FlyDSL kernel can be loaded.
ultraquant_flydsl_decode_eligible(*, head_size, num_kv_groups, has_sinks, sliding_window, flydsl_loaded)
¶
Return whether decode should use the gfx950 FlyDSL kernel.
Production FlyDSL covers D=256 and GQA in {6, 8, 16}. Sinks and sliding
window fall back to unified Triton. flydsl_loaded is the process-level
compiler/hardware probe so this policy can be unit-tested without a GPU.