build_sites() walks one rank's Program after declare and makes a Site of every LoRA-capable
trunk GEMM (gemm_nt, gemm_nt_bias without act, gemm_nt_q without pb1/pb2 and with K equal to the
weight's, gemm_nt_q_bias) whose `b` weight a target leaf names. The geometry is read off what the
plugin recorded on the weight -- shard mode, row parts, shard and per-part spans, name-map
sources -- and is checked against weight_share() on a plain view of the weight, so the LoRA slice
and the loader's slice cannot disagree. Sites of one declared weight share one pool.
weight_targeted() is the one predicate (scope rule in lora.h), usable mid-declare.
find_unsupported_uses() lists every live op that reads a targeted weight and is not a site: a
fused gated fold, a routed expert, a weight stored in a transform basis, a rotated or widened
gemm_nt_q. Unresolved ops the builder recorded are never issued and are skipped.
load_adapter() reads adapter_config.json and adapter_model.safetensors, refuses what is not
plain linear LoRA (DoRA, other peft types, modules_to_save, trained or lora biases, embedding
LoRA, fan_in_fan_out, parameter LoRA, rank above the cap, rank/shape mismatches, an ambiguous
VLM spelling), computes alpha/r or alpha/sqrt(r) with rank_pattern/alpha_pattern searched as
rad-export does, converts BF16/F16/F32 to bf16 RNE and packs one slot per pool. A fused weight
whose sources are fewer than its row parts (the delta net's ssm_inz) is laid out from the
adapter's B rows. A module no site on this rank takes is listed, not refused -- an
attention-zero rank declares no q/k/v/o -- and check_placed() refuses one no rank took.
tests/lora_test.cpp declares with the real Builder and arch/common's LinearFP8 (fused qkv and
gate_up; gated attention with an attention-zero rank and KV replication; the delta net's uneven
2/2/1 head split) at worlds 1-4 and holds every rank's slot product to the dense delta. It
loads no kernel plugin, so it never reaches the device layer.