vllm.compilation.vllm_inductor_pass ¶
PrinterInductorPass ¶
Bases: VllmInductorPass
Source code in vllm/compilation/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/vllm_inductor_pass.py
VllmPatternMatcherPass ¶
Bases: VllmInductorPass
A VllmInductorPass that uses the Inductor pattern matcher. Its main use is providing the dump_patterns utility that dumps the Inductor pattern matcher patterns into a file, which greatly aids debugging.
TODO(luka) move more utilities to this pass.
Source code in vllm/compilation/vllm_inductor_pass.py
64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 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 |
|
_OP_OVERLOAD_PATTERN class-attribute
¶
matched_count class-attribute
instance-attribute
¶
matched_count: int = 0
The number of matched patterns in the pass.
_replace_op_overloads ¶
Replace
dump_patterns ¶
dump_patterns(
config: VllmConfig, pm_pass: PatternMatcherPass
)
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