vllm.model_executor.warmup.jit_warmup_triton_helper ¶
Classes:
-
TritonCompileKey–Triton-derived compile key with one non-comparing replay input.
-
TritonJitKey–Process-local identity of one Triton JIT specialization.
-
TritonKernelDispatcher–Callable Triton launcher with compile-time warmup support.
-
TritonWarmupTensor–Compile-only tensor metadata used by Triton warmup.
-
VllmTritonJitKernel–Triton owner whose runtime launch specification is reused for warmup.
Functions:
-
triton_kernel_dispatcher_with_warmup–Decorate a dispatch function or a native Triton kernel for warmup.
-
triton_scalar_specialization_rep–Return an integer with the same default Triton JIT specialization.
-
triton_warmup_inputs–Build launcher inputs from Triton's native positional argument order.
TritonCompileKey dataclass ¶
Triton-derived compile key with one non-comparing replay input.
Source code in vllm/model_executor/warmup/jit_warmup_triton_helper.py
TritonJitKey dataclass ¶
Process-local identity of one Triton JIT specialization.
Source code in vllm/model_executor/warmup/jit_warmup_triton_helper.py
TritonKernelDispatcher ¶
Bases: Protocol[P]
Callable Triton launcher with compile-time warmup support.
Source code in vllm/model_executor/warmup/jit_warmup_triton_helper.py
TritonWarmupTensor dataclass ¶
Compile-only tensor metadata used by Triton warmup.
strides=None represents compact row-major storage. Pass explicit strides whenever the runtime tensor can be padded, transposed, or otherwise strided.
Source code in vllm/model_executor/warmup/jit_warmup_triton_helper.py
VllmTritonJitKernel ¶
Bases: VllmJitKernel[CompileKeyT], Generic[CompileKeyT]
Triton owner whose runtime launch specification is reused for warmup.
Methods:
-
warmup_inputs–Return runtime-shaped inputs that reproduce one compile key.
Source code in vllm/model_executor/warmup/jit_warmup_triton_helper.py
207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 | |
warmup_inputs(compile_key) abstractmethod ¶
Return runtime-shaped inputs that reproduce one compile key.
_triton_key_deriver(kernel) ¶
Prepare Triton's key derivation once for one kernel and device.
Source code in vllm/model_executor/warmup/jit_warmup_triton_helper.py
322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 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 | |
triton_kernel_dispatcher_with_warmup(*, warmup_inputs, kernel=None) ¶
Decorate a dispatch function or a native Triton kernel for warmup.
Source code in vllm/model_executor/warmup/jit_warmup_triton_helper.py
triton_scalar_specialization_rep(value) ¶
Return an integer with the same default Triton JIT specialization.
For an ordinary integer argument, Triton's cache key contains its inferred type (i32, i64, or u64) and one of three value classes:
1is specialized as the exact constant1.- Multiples of 16 receive a
tt.divisibility = 16attribute. - All other values have no value specialization.
Warmup only needs one concrete value for each cache-key class. This helper returns 1 for the exact-one class and otherwise returns a divisible or generic representative while preserving the inferred integer type.
This applies only to non-constexpr integer arguments using Triton's default specialization. Do not use it for arguments listed in do_not_specialize or do_not_specialize_on_alignment.
Source code in vllm/model_executor/warmup/jit_warmup_triton_helper.py
triton_warmup_inputs(kernel, *args, grid, pointer_dtypes=None, **kwargs) ¶
Build launcher inputs from Triton's native positional argument order.