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.
Source code in vllm/v1/attention/ops/flydsl_ultraquant_decode.py
191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 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 | |
_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).
Source code in vllm/v1/attention/ops/flydsl_ultraquant_decode.py
_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.
Source code in vllm/v1/attention/ops/flydsl_ultraquant_decode.py
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.
Source code in vllm/v1/attention/ops/flydsl_ultraquant_decode.py
577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 | |
is_ultraquant_flydsl_available()
¶
Return whether the gfx950 UltraQuant FlyDSL kernel can be loaded.
Source code in vllm/v1/attention/ops/flydsl_ultraquant_decode.py
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.