vllm.compilation.passes.fusion.matcher_utils
¶
Classes:
-
MatcherCustomOp– -
MatcherRMSNormGated–Matches RMSNormGated with norm_before_gate=True and group_size=None.
-
MatcherRotaryEmbedding–Matches base RoPE as RotaryEmbedding emits it: the flashinfer custom op,
Functions:
-
aiter_fused_rope_supported–Whether AITER's fused_qk_rope_reshape_and_cache supports the match: it
-
rope_custom_op_is_c_kernel–XPU's RotaryEmbedding.forward_xpu calls the in-place
_Ckernel directly
MatcherCustomOp
¶
Bases: ABC
Methods:
-
inputs–Utility for inputs to the pattern.
Source code in vllm/compilation/passes/fusion/matcher_utils.py
MatcherRMSNormGated
¶
Bases: MatcherCustomOp
Matches RMSNormGated with norm_before_gate=True and group_size=None.
Source code in vllm/compilation/passes/fusion/matcher_utils.py
MatcherRotaryEmbedding
¶
Bases: MatcherCustomOp
Matches base RoPE as RotaryEmbedding emits it: the flashinfer custom op,
the in-place _C op on XPU with the custom op enabled, else the IR node.
Source code in vllm/compilation/passes/fusion/matcher_utils.py
aiter_fused_rope_supported(match, head_size)
¶
Whether AITER's fused_qk_rope_reshape_and_cache supports the match: it needs full rotary and a power-of-2 head size.
Source code in vllm/compilation/passes/fusion/matcher_utils.py
rope_custom_op_is_c_kernel()
¶
XPU's RotaryEmbedding.forward_xpu calls the in-place _C kernel directly
instead of the vLLM IR op, so its graphs contain _C.rotary_embedding.