vllm.compilation.passes.fusion.allreduce_rms_fusion ¶
Classes:
-
AllReduceFusedAddGemmaRMSNormPattern–Gemma-style variant of AllReduceFusedAddRMSNormPattern (with residual).
-
AllReduceFusedAddRMSNormPattern–This pattern replaces the allreduce + rms norm (with residual)
-
AllReduceFusedAddRMSNormStaticQuantFP8Pattern–This pattern replaces the allreduce + rms norm (with residual)
-
AllReduceFusedAddRMSNormStaticQuantNVFP4Pattern–This pattern replaces the allreduce + rms norm (with residual)
-
AllReduceFusedRMSNormStaticQuantFP8Pattern–This pattern replaces the allreduce + rms norm (without residual)
-
AllReduceFusedRMSNormStaticQuantNVFP4Pattern–This pattern replaces the allreduce + rms norm (without residual)
-
AllReduceGemmaRMSNormPattern–Gemma-style variant of AllReduceRMSNormPattern (no residual).
-
AllReduceRMSNormPattern–This pattern replaces the allreduce + rms norm (without residual)
-
FlashInferFusedAllReduceParams–Parameters for FlashInfer fused allreduce operations.
AllReduceFusedAddGemmaRMSNormPattern ¶
Bases: BasePattern
Gemma-style variant of AllReduceFusedAddRMSNormPattern (with residual).
Source code in vllm/compilation/passes/fusion/allreduce_rms_fusion.py
AllReduceFusedAddRMSNormPattern ¶
Bases: BasePattern
This pattern replaces the allreduce + rms norm (with residual) with fused flashinfer implementation. Applies to o_proj + rmsnorm after attn and mlp + rmsnorm before attn.
Source code in vllm/compilation/passes/fusion/allreduce_rms_fusion.py
368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 | |
AllReduceFusedAddRMSNormStaticQuantFP8Pattern ¶
Bases: BasePattern
This pattern replaces the allreduce + rms norm (with residual) + static fp8 quant with fused flashinfer implementation. Applies to o_proj + rmsnorm after attn + quant and mlp + rmsnorm + quant before attn.
Source code in vllm/compilation/passes/fusion/allreduce_rms_fusion.py
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 | |
AllReduceFusedAddRMSNormStaticQuantNVFP4Pattern ¶
Bases: BasePattern
This pattern replaces the allreduce + rms norm (with residual) + static nvfp4 quant with fused flashinfer implementation. Applies to o_proj + rmsnorm after attn + quant and mlp + rmsnorm + quant before attn.
Source code in vllm/compilation/passes/fusion/allreduce_rms_fusion.py
813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 | |
AllReduceFusedRMSNormStaticQuantFP8Pattern ¶
Bases: BasePattern
This pattern replaces the allreduce + rms norm (without residual) + static fp8 quant with fused flashinfer implementation. Applies to allreduce + rmsnorm + quant before attn in the first Transformer block.
Source code in vllm/compilation/passes/fusion/allreduce_rms_fusion.py
AllReduceFusedRMSNormStaticQuantNVFP4Pattern ¶
Bases: BasePattern
This pattern replaces the allreduce + rms norm (without residual) + static nvfp4 quant with fused flashinfer implementation. Applies to allreduce + rmsnorm + quant before attn in the first Transformer block.
Source code in vllm/compilation/passes/fusion/allreduce_rms_fusion.py
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 | |
AllReduceGemmaRMSNormPattern ¶
Bases: BasePattern
Gemma-style variant of AllReduceRMSNormPattern (no residual).
Source code in vllm/compilation/passes/fusion/allreduce_rms_fusion.py
AllReduceRMSNormPattern ¶
Bases: BasePattern
This pattern replaces the allreduce + rms norm (without residual) with fused flashinfer implementation. Applies to allreduce + rmsnorm before attn in the first Transformer block.
Source code in vllm/compilation/passes/fusion/allreduce_rms_fusion.py
FlashInferFusedAllReduceParams ¶
Parameters for FlashInfer fused allreduce operations.
Source code in vllm/compilation/passes/fusion/allreduce_rms_fusion.py
_norm_input_weight_dtype_match(match) ¶
Prevent fusion when the norm input and weight dtypes differ (e.g. a Gemma fp32 weight.float()+1 gamma), covering rms_norm and fused_add_rms_norm.