vllm.lora.ops.xpu_ops
¶
Modules:
-
lora_ops–
Functions:
-
lora_linear–Apply shrink and expand for all slices of a linear layer.
lora_linear(output_tensor, inputs, lora_a_weights, lora_b_weights, lora_indices_tensor, single_lora_slot, output_slices, scaling, add_inputs, allow_gemm, gemm_min_tokens)
¶
Apply shrink and expand for all slices of a linear layer.
If allow_gemm is set, single_lora_slot (a one-element host tensor) holds
a slot index and the batch has at least gemm_min_tokens tokens, every
token is assumed to use that adapter and dense GEMMs are used; otherwise
BGMV is used.