vllm.compilation.passes.vllm_inductor_pass ¶
VllmFusionPatternMatcherPass ¶
Bases: VllmPatternMatcherPass
A VllmPatternMatcherPass for passes that use VllmPatternReplacement objects. Subclasses register patterns via self.register() in their own init.
Source code in vllm/compilation/passes/vllm_inductor_pass.py
VllmInductorPass ¶
Bases: InductorPass
An inductor pass with access to vLLM PassConfig. It provides timing, logging, and dumping utilities.
Source code in vllm/compilation/passes/vllm_inductor_pass.py
VllmPatternMatcherPass ¶
Bases: VllmInductorPass
A VllmInductorPass that uses the Inductor pattern matcher. Provides pattern registration with match counting, debug dumping, and logging.
Source code in vllm/compilation/passes/vllm_inductor_pass.py
92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 | |
match_table class-attribute ¶
match_table: defaultdict[str, int] = defaultdict(int)
Global table mapping pass name to its total match count.
matched_count class-attribute instance-attribute ¶
matched_count: int = 0
The number of matched patterns in the pass.
_replace_op_overloads ¶
Replace
Source code in vllm/compilation/passes/vllm_inductor_pass.py
dump_patterns ¶
dump_patterns(
config: VllmConfig, pm_pass: PatternMatcherPass
) -> None
If debug dumping is enabled, dump the Inductor pattern-matcher patterns into the debug_dump_path folder next to the dumped fx graphs.
This method does its best to print something that looks like Python code for easier debugging and potentially navigation. If any errors appear in the output, please add to this method.
TODO(luka): use pattern object to manually produce pattern graph
Source code in vllm/compilation/passes/vllm_inductor_pass.py
VllmPatternReplacement ¶
A pattern/replacement pair for FX graph fusion.
Implement the three abstract members below, then pass instances to VllmFusionPatternMatcherPass.register(). The pass will find every occurrence of pattern in the graph and substitute it with replacement.