pub fn apply_expert_lora_sorted(
gpu: &dyn GpuBackend,
kernels: &LoraKernels,
layer: &ExpertLoraLayer,
proj: ExpertProj,
expert_offsets_host: &[u32],
x: DevicePtr,
base_out: DevicePtr,
max_rows: u32,
lora_xa: DevicePtr,
lora_delta: DevicePtr,
stream: u64,
) -> Result<()>Expand description
2026-09-25: Fold proj’s per-expert deltas onto the expert-sorted
grouped-GEMM output. x is the sorted input ([total_expanded, k_in]),
base_out the sorted output ([total_expanded, n_out], in place), and
expert_offsets_host a host copy of expert_offsets. Only experts with a
pair for proj and at least one row are folded, each over its own row
block.