vllm.lora.ops.triton_ops.lora_kernel_metadata
¶
LoRA kernels metadata preparation utilities.
Classes:
LoRAKernelMeta
dataclass
¶
Methods:
-
meta_args–This function returns the kernel metadata required for the current
-
prepare_tensors–Prepare kernel metadata tensors for the current forward pass.
meta_args(token_nums, specialize_active_lora)
¶
This function returns the kernel metadata required for the current forward pass execution of the kernel. The function returns all the metadata required by the kernel, in order, as a tuple, so it can be unpacked directly during the lora_shrink/lora_expand function call.
Parameters:
-
(token_nums¶int | None) –Number of input tokens in the current forward pass. Use
Noneto return the full token buffers for kernels that check token bounds themselves. -
(specialize_active_lora¶bool) –If True, report the actual active LoRA count; otherwise report the padded default, which keeps the kernel launch shape stable.