pub struct LoraKernels {
pub gemv_k: KernelHandle,
pub gemm_tc_k: KernelHandle,
pub gemm_tc_acc_k: KernelHandle,
pub gemm_k: KernelHandle,
pub scaled_add_k: KernelHandle,
pub bgmv_shrink_k: KernelHandle,
pub bgmv_expand_fold_k: KernelHandle,
pub moe_down_shrink_k: KernelHandle,
pub moe_down_expand_fold_k: KernelHandle,
pub moe_gather_shrink_k: KernelHandle,
pub moe_gather_expand_fold_k: KernelHandle,
}Expand description
Resolved once at adapter load (module names per common/KERNEL.toml: gemv=dense_gemv_bf16.cu, gemm_tc=dense_gemm_tc.cu, gemm=dense_gemm_bf16.cu, residual_add=residual_add.cu — stem, no override).
Fields§
§gemv_k: KernelHandle§gemm_tc_k: KernelHandle§gemm_tc_acc_k: KernelHandleFused expand+fold (C += scale * A@B^T). 0 on miss -> the
unfused gemm_tc + scaled_add pair, which is what this replaces.
gemm_k: KernelHandle§scaled_add_k: KernelHandle§bgmv_shrink_k: KernelHandleM2 fused batched bgmv (per-request routing): shrink then expand+fold. Module “lora_bgmv” (stem == module — no KERNEL.toml override).
bgmv_expand_fold_k: KernelHandle§moe_down_shrink_k: KernelHandleFeature-1 device-side MoE expert down_proj fold: shrink then expand+fold,
keyed on expert via device expert_offsets. Module “moe_lora_grouped_down”
(stem == module). KernelHandle(0) on miss (e.g. non-CUDA builds) — the
launcher bails loudly rather than dispatching a null handle.
moe_down_expand_fold_k: KernelHandle§moe_gather_shrink_k: KernelHandleSOLID Incr-4 DECODE-path MoE expert down_proj fold: shrink then
expand+fold, keyed on expert via the per-slot indices array (the
unsorted slot-major analogue of moe_down_*_k). Module
“moe_lora_gather_bgmv” (stem == module). KernelHandle(0) on miss (e.g.
non-CUDA builds) — the launcher bails loudly rather than dispatching null.
moe_gather_expand_fold_k: KernelHandleImplementations§
Source§impl LoraKernels
impl LoraKernels
pub fn new(gpu: &dyn GpuBackend) -> Result<Self>
Trait Implementations§
Source§impl Clone for LoraKernels
impl Clone for LoraKernels
Source§fn clone(&self) -> LoraKernels
fn clone(&self) -> LoraKernels
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more