feat(prefetch): add opt-in lookahead-3 prefetching option for PILOT=3

This commit is contained in:
Egon Ruiter
2026-07-15 20:17:45 +02:00
parent 4ae4f61d16
commit b3fdb145f8
+2
View File
@@ -542,6 +542,8 @@ static float *step(Model *m, const int *ids, int S, int pos_base) {
* PILOT=2 -> prefetch layer i+2 using completed state x (containing MoE residual). */
if (g_pilot >= 2 && S <= 8 && i + 2 < c->n_layers)
pilot_prefetch(m, i + 2, x, S);
if (g_pilot >= 3 && S <= 8 && i + 3 < c->n_layers)
pilot_prefetch(m, i + 3, x, S);
}
/* IMPROVEMENT 2: count tokens; trigger hot pinning after warmup */
m->token_count++; m->freq_token_count++;