pub fn lora_no_apply() -> boolExpand description
base_out[m, n_out] += scale * (x[m, k_in] @ a^T) @ b^T.
CONTIGUITY CONTRACT: x rows contiguous with stride k_in2 bytes, base_out rows contiguous with stride n_out2 bytes. Every v0 site satisfies this (k/v/o/gate/up/down all land in dedicated contiguous buffers/regions); strided cases (multi-seq per-seq qkv_buf) must loop with m=1 on offset ptrs.
GRAPH-SAFE: pure kernel launches, no alloc/sync; a/b (load-time device weights), lora_xa/lora_delta (BufferArena, fixed address), and scale (baked kernel arg, constant for a startup-static adapter) are all pointer/value-stable across capture and replay — identical status to base weights. m==1 -> GEMV; m>1 -> tensor-core GEMM (scalar fallback).
POOL LAYOUT (lora/mod.rs pack): A is [max_rank, k_in] (real rows at the
head, pad rows zero), B is [n_out, max_rank] row-major (pad COLS zero,
row stride = max_rank). Both stages therefore run at pair.max_rank:
shrink n = max_rank (xa pad cols come out zero), expand k = max_rank
(matches B’s row stride; zero pads contribute nothing) — bit-identical
to a true-rank product.
ATLAS_LORA_NO_APPLY=1 — keep the adapter RESIDENT but skip every delta.
A measurement lever, not a serving one: it separates “what does applying the adapter cost” from “what does having an adapter loaded cost”, which are different numbers and were conflated the first time this path was profiled. Output is base-like while set, so it is useless for serving and is never a default.