vllm.model_executor.warmup.jit_warmup_triton_helper ¶
Classes:
-
TritonWarmupTensor–Compile-only tensor metadata used by Triton warmup.
-
VllmTritonJitKernel–Triton owner whose runtime launch specification is reused for warmup.
Functions:
-
kernel_launcher–Launch a Triton kernel from a declarative
__call__specification. -
triton_scalar_specialization_rep–Return an integer with the same default Triton JIT specialization.
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
warmup_inputs(compile_key) abstractmethod ¶
Return runtime-shaped inputs that reproduce one compile key.
kernel_launcher(call_fn) ¶
Launch a Triton kernel from a declarative __call__ specification.
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.