vllm.v1.worker.gpu.async_utils
¶
Classes:
-
AsyncOutput– -
AsyncPoolingOutput– -
StepTimingCollector–Times the steps run inside
collect; record calls no-op outside it.
Functions:
-
stream–Lightweight version of torch.cuda.stream() context manager which
AsyncOutput
¶
Bases: AsyncModelRunnerOutput
Methods:
-
get_kv_connector_output–Get the KV connector output for this async output.
Source code in vllm/v1/worker/gpu/async_utils.py
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 188 189 190 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 | |
get_kv_connector_output()
¶
AsyncPoolingOutput
¶
Bases: AsyncModelRunnerOutput
Methods:
-
get_kv_connector_output–Get the KV connector output for this async output.
Source code in vllm/v1/worker/gpu/async_utils.py
get_kv_connector_output()
¶
StepTimingCollector
¶
Times the steps run inside collect; record calls no-op outside it.
Every step gets its own events, so the steps queue back-to-back and the block resolves them all behind one sync on the way out.
Methods:
-
collect–Time every step run in this block.
-
drafter_end–Ends the step: only steps that reach here have a draft cost.
-
record_batch–Costs from different execution modes must not share a cost curve.
Source code in vllm/v1/worker/gpu/async_utils.py
collect()
¶
Time every step run in this block.
The yielded list holds one sample per timed step once the block exits; it stays empty inside the block, where the timings are still on device.
Source code in vllm/v1/worker/gpu/async_utils.py
drafter_end()
¶
Ends the step: only steps that reach here have a draft cost.
record_batch(input_batch, full_cudagraph)
¶
Costs from different execution modes must not share a cost curve.
stream(to_stream, from_stream)
¶
Lightweight version of torch.cuda.stream() context manager which avoids current_stream and device lookups.