Archived
place: routing-aware file-tier reads
The file tier read every file-tier unit of a routed layer whether or not the router sent rows to it. A deep layer keeps whole experts on the drive (288 per world), but a pass routes rows to a handful of them: the read volume was ~18x what the router justified, and the engine streamed ~378 GiB from the SSD per run at 2.05 tok/s (GLM-5.3-Flash, TP2). The layer's router has run by the time the stager triggers -- the trigger is the layer's first expert op -- so the pass's route counts are already on the device. Ctx::route_counts_device exposes them; the file stager hands them to Mover::stage_file_units, and an expert counted zero, which has no sorted rows and no GEMM run naming it, is left on the drive: its weights are not read at all. Its table entries are published at a valid dummy address (the calm region) for the pass and nulled again with the staged units, because the kernels still issue the layer's table and a null entry fails the step. Published even when EVERY unit of the layer is skipped -- a decode step can route nothing to a layer. The drafter's own weights (the "mtp." namespace) run on every draft pass of every decode step, more often than anything a profile could rank, so the planner pins them in the host pool ahead of everything ranked (MoveUnit::draft_head) instead of letting the expert fill push them to the file tier every step. Read extents are also clamped to the container file's size, so a truncated container fails a read loudly instead of reading past EOF. Measured on GLM-5.3-Flash TP2 (2x Radeon R9700), 250-token essay at temp 0: 3.4-3.6 tok/s where main gives 1.42 on the same prompt. Assisted-by: GLM-5.3-Flash
This commit is contained in:
1 parent
9647b84ee0
commit
9efdd00c4c
9 files changed
+208
-24
No files matched your search
@@ -327,6 +327,11 @@ public:
|
||||
/* Called by the drain, so the ring knows which banks are still unread. */
|
||||
void mark_credited(int layer, int bank);
|
||||
const RadRouting* last_routing(int layer) const;
|
||||
/* The device pointer of `layer`'s expert counts for the current step, with `n_expert` set,
|
||||
* or null when the layer has not reported this step (a routing-aware file stager then
|
||||
* reads the layer whole). The pointer is stream-ordered behind the router: a copy on the
|
||||
* compute stream at the stager's trigger sees this pass's counts. */
|
||||
const int32_t* route_counts_device(int layer, int64_t* n_expert) const;
|
||||
|
||||
/* ---------------------------------------------------------- the placement seam */
|
||||
/* Change an op's execution site. Refuses with RAD_E_NOKERNEL, naming op and band, if the
|
||||
|
||||
Reference in new issue
Block a user