Expand description
RDMA LoRA staging (spark-model half): turn a peer-staged adapter’s manifest
into a set of pool-slot LANDING TARGETS (the only place classify_key +
the per-slot offset math live), then drive spark_storage::RdmaLoraLoader
to RDMA-load the adapter’s A/B straight into a resident slot for fast
rotation. Landing is byte-identical to the disk pack (the loader does the
same F16/F32→BF16 convert + B row-repack).
Gated behind $ATLAS_LORA_PEER at the call site; when unset the disk
rotation path is unchanged.
Functions§
- build_
land_ targets - Build the landing targets for one adapter’s manifest into pool
slot. Eachlora_A/lora_Btensor is classified to (layer, module, A|B) and mapped to its byte sub-regionpool + slot*slot_bytes + a_off|b_off. The adapter’s real rank r is read from the tensor shape (A=[r,in], B=[out,r]). Rejections fromclassify_key(GDN / wrong-layer / non-PEFT key) fire here too — never a silent skip. - fetch_
adapter_ manifest - Fetch a peer-staged adapter’s manifest over the
weight_peercontrol channel (connect → request → read manifest, then drop the connection). Needed to build landing targets before the loader’s own verbs handshake. - rebuild_
slot_ layers - Rebuild a slot’s per-layer
LoraLayerWeightsafter an in-place RDMA reload — the A/B bytes changed AND the adapter’s r/scale may differ, so theLoraPairs (which bake rank + scale) must be rebuilt, not just re-pointed. Pointers are deterministic (pool + slot*slot_bytes + off); this does NOT touch the GPU. Modules present are those with a target of the matching kind. - slot_
bytes - The per-slot byte length (re-exported so the swap path can re-zero exactly one slot’s sub-region before an in-place reload).