Archived
radiance 1.15.0
New models and formats: - IQR for Qwen3.8-27B: weights on the int8 grid under GPTQ, a trellis down each GPTQ column (IQR-V2), and IQR-V3, a computed trellis code under one scale a row, kept at its codes' width in VRAM and decoded in the GEMM; 15 IQR-V3 recipes from ~2 to ~7 bits a weight (data/recipes/q38-27b-*-v3.recipe, docs/IQR.md) - libhalo: a kernel library for Strix Halo (gfx1151), preferred there over libr3d - Nemotron 3.5 Embed 1B and 8B (nemotron35_embed): text and image embeddings through a Pixtral tower, on the card and on the CPU - Nemotron 3.5 Rerank 8B - /v1/systemone: Cloudflare's clef and clef-flash, Convai Innovations' Laya and Mica beside LiquidAI d1; scored steps read the candidates' logits from the head table with no lm_head pass - LFM2's 8-bit trunk: block-fp8 or int8 linears with the fused producers, and the d1-3B recipe - DeepSeek-V4.1's reply format with DSML tool calls and typed argument tags Weights on the drive: - The file tier reads only the experts the pass routes rows to; the draft head's weights stay in the host pool - A hot VRAM cache for routed experts read off the drive, reads deposited straight into free host pool slots, and copyless evictions; the file tier's counters are now ssd_* - GLM-5 Next shards its routed experts by expert, not by width, so they can live on the drive - The stall watch counts drive reads as progress, and the DMA lane's room check reads the lane's own completion fence Quantisation tooling: - --calib-corpus, --calib-dir and --calib-layers record each linear's input Hessian; beside --kld-record the reference's own run records them - --kld-top N records a sparse KL reference (the N most likely tokens and the tail's mass) - GPTQ in a third of the time with the same codes, trellis GPTQ on the card, vector codebooks with coordinate descent, and rad-convert --reuse repeated, each container supplying what the earlier ones lack Speculation: - Prompt lookup alone (--spec-ngram K, --spec-ngram-min/-max): each sequence keeps an index of its n-grams, and a proposal is verified only when its measured step cost says it pays; --draft-window adaptive follows it Speed: - IQR decode: the narrow tile splits K for four times the int8 tile's waves and folds each 128-K block once; at 8 tokens down and the output projections run in 0.61-0.82x and 0.70-0.92x FP8's time (2-6 bits); IQ6R-S-V3 with its DFlash2 drafter steps in 26.3 ms at TP2, against 29.4 ms before and FP8's 27.3 - Qwen MXFP4 feed-forward: the gated fold up to 16 rows, not 8 - libr4d: the gated prefill fold, the short-prompt split row, and the rows forms of rmsnorm and rope; KLATE again for the head-256 gqa6 paged prefill; gram_accum on the matrix cores Features: - /health, /v1/health and /ping answer 503 with "status": "stuck" once the device has advanced nothing for a minute or a queue has faulted, so a supervisor can restart a wedged server (#356) - --image-gen-max-pixels and --image-gen-max-refs size an image generator's buffers (#344) - The startup report lists only the options not at their default, with a count; -v lists all (#250) - --preempt-wait-ms bounds how long a preempted prefill waits for its whole-recompute room - --placement layer_offload spills dense layers so one --max-model-len sequence fits - Startup refuses amdgpu with CWSR off and says how to fix it; --proceed-with-incompatible-configuration starts anyway under an UNSUPPORTED banner Fixes: - The n-gram read-ahead hands each row to the reader once and reads only as far ahead as the row cache holds, and pauses while decode reads: about one drive read a row instead of two (#355) - A file-tier window reads each of its runs once, not once a run per run - The decode split law's verify floor is bounded by the batch's workgroups: max_seqs 256 no longer declares 64x the scratch (#342) - A prefetch DMA list's mark stays out of the signal pool until the engine has read it, and a prefill stage copies only the blocks its own tables name (#343) - The split-KV row sum is read with fetch-inactive (#328) - LFM2 on the host backend: libref and libavx serve the row-form ops it declares (#348) - The preempted-prefill gate skips a KV group that holds no blocks (#352) - Every request entry point bounded, gated and sanitised (JSON depth, invalid UTF-8, control bytes in the log, the dashboard's CSP, cross-origin browsers on the loopback-only routes); a prompt id outside the vocabulary refused at admission; --api-key "" refused at startup - The telemetry the HTTP thread reads is atomic - An RMS norm row no longer depends on how many rows its launch carries; prefill attention's rescale is decided by live rows only - A --kld-record prefill chunk that finishes no sequence gets its logits on a tied-head model - A kernel's lazily made counter block is zeroed outside the lock other ranks take (a TP2 first-step hang) Changes: Plugin ABI 32. Every plugin exports a layout fingerprint of the ABI structs and the loader refuses a plugin without it or with another (#302), so out-of-tree plugins must be rebuilt. Appended: RadBuildCtx calib_* and gen_max_*, RadArchProbe gen_max_*, RadBatch score_only and plugin_words, RadDeviceProps::unified, RadChatFormat arg_json_value_prefix.
This commit is contained in:
commit
9ed3ef7a7b
452 files changed
+167762
-1346
No files matched your search
+116
-34
@@ -17,7 +17,8 @@ thread_local int g_last_layer = -1;
|
||||
struct PassStage {
|
||||
uint64_t layers = 0, bytes = 0;
|
||||
int64_t tokens = 0, ctx = 0, live_row = 0; /* live_row: the history one layer reads */
|
||||
int64_t bound_blocks = 0; /* the manager's bound the copy was clamped to */
|
||||
int64_t bound_blocks = 0; /* blocks a layer's copy covers, the gaps it joins included */
|
||||
int64_t runs = 0; /* ranges a layer's list carries */
|
||||
int phase = -1;
|
||||
};
|
||||
thread_local PassStage g_pass;
|
||||
@@ -35,11 +36,11 @@ void report_pass() {
|
||||
if (!g_pass.layers || !trace_stage()) return;
|
||||
const double live = (double)g_pass.live_row * (double)g_pass.layers;
|
||||
RAD_INFO("kv streaming: stage pass phase=%d tokens=%lld ctx=%lld: %llu layers, %.1f MiB moved, "
|
||||
"%.1f MiB of live history (%.1fx), bound %lld blocks",
|
||||
"%.1f MiB of live history (%.1fx), bound %lld blocks in %lld ranges",
|
||||
g_pass.phase, (long long)g_pass.tokens, (long long)g_pass.ctx,
|
||||
(unsigned long long)g_pass.layers, (double)g_pass.bytes / (1024.0 * 1024.0),
|
||||
live / (1024.0 * 1024.0), live > 0.0 ? (double)g_pass.bytes / live : 0.0,
|
||||
(long long)g_pass.bound_blocks);
|
||||
(long long)g_pass.bound_blocks, (long long)g_pass.runs);
|
||||
}
|
||||
} /* namespace */
|
||||
|
||||
@@ -96,35 +97,97 @@ void kvstream_enter(Ctx* c, const RadBatch* b) {
|
||||
const int64_t live_blocks = (reach + b->kv[i].block_size - 1) / b->kv[i].block_size;
|
||||
const int64_t row = std::min(live_blocks * b->kv[i].stream->block_bytes, kb->stage.bytes);
|
||||
if (row > g_pass.live_row) g_pass.live_row = row;
|
||||
if (kb->stage_live_bytes > 0) {
|
||||
const int64_t bound = kb->stage_live_bytes / b->kv[i].stream->block_bytes;
|
||||
if (bound > g_pass.bound_blocks) g_pass.bound_blocks = bound;
|
||||
}
|
||||
int64_t staged = 0;
|
||||
for (const KVStageRun& r : kb->stage_runs) staged += r.bytes;
|
||||
const int64_t bound = staged / b->kv[i].stream->block_bytes;
|
||||
if (bound > g_pass.bound_blocks) g_pass.bound_blocks = bound;
|
||||
if ((int64_t)kb->stage_runs.size() > g_pass.runs) g_pass.runs = (int64_t)kb->stage_runs.size();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* The allocator's high-water mark in bytes of one layer (stage.h, "Volume"). */
|
||||
void kvstream_bound_live(Ctx* c, const KVManager& kv) {
|
||||
if (!c) return;
|
||||
void kvstream_runs(const std::vector<const std::vector<int32_t>*>& tables, int64_t block_bytes,
|
||||
std::vector<KVStageRun>* out) {
|
||||
out->clear();
|
||||
if (block_bytes <= 0) return;
|
||||
using Run = std::pair<int64_t, int64_t>; /* [first, end) in blocks */
|
||||
thread_local std::vector<Run> r, m, j;
|
||||
thread_local std::vector<int64_t> gaps;
|
||||
r.clear();
|
||||
/* Runs of consecutive ids in table order: an allocator that hands out ascending ids makes a
|
||||
* long table a few runs, so the sort below is over runs, not entries. */
|
||||
for (const std::vector<int32_t>* t : tables) {
|
||||
if (!t) continue;
|
||||
for (const int32_t id : *t) {
|
||||
if (id < 0) continue;
|
||||
if (!r.empty() && r.back().second == id) ++r.back().second;
|
||||
else r.emplace_back((int64_t)id, (int64_t)id + 1);
|
||||
}
|
||||
}
|
||||
if (r.empty()) return;
|
||||
std::sort(r.begin(), r.end());
|
||||
m.clear();
|
||||
for (const Run& x : r) {
|
||||
if (!m.empty() && x.first <= m.back().second + kStageGapBlocks)
|
||||
m.back().second = std::max(m.back().second, x.second);
|
||||
else
|
||||
m.push_back(x);
|
||||
}
|
||||
if ((int64_t)m.size() > kStageMaxRuns) {
|
||||
/* Join across the smallest gaps: every gap up to the one that leaves kStageMaxRuns. */
|
||||
gaps.clear();
|
||||
for (size_t i = 1; i < m.size(); ++i) gaps.push_back(m[i].first - m[i - 1].second);
|
||||
const size_t cut = m.size() - (size_t)kStageMaxRuns; /* gaps to close, at least */
|
||||
std::nth_element(gaps.begin(), gaps.begin() + (ptrdiff_t)(cut - 1), gaps.end());
|
||||
const int64_t th = gaps[cut - 1];
|
||||
j.clear();
|
||||
for (const Run& x : m) {
|
||||
if (!j.empty() && x.first - j.back().second <= th) j.back().second = x.second;
|
||||
else j.push_back(x);
|
||||
}
|
||||
m.swap(j);
|
||||
}
|
||||
for (const Run& x : m)
|
||||
out->push_back(KVStageRun{ x.first * block_bytes, (x.second - x.first) * block_bytes });
|
||||
}
|
||||
|
||||
void kvstream_step_runs(const KVManager& kv, const RadBatch* b, const std::vector<uint64_t>* seqs,
|
||||
std::vector<std::vector<KVStageRun>>* runs) {
|
||||
runs->resize((size_t)std::max(0, (int)kv.n_groups()));
|
||||
const bool stages = b && kv_pass_view(b->phase, b->n_tok, b->n_seq, b->n_spec) == KVView::Stage;
|
||||
thread_local std::vector<const std::vector<int32_t>*> tables;
|
||||
for (int g = 0; g < kv.n_groups(); ++g) {
|
||||
KVPoolBinding* b = c->kv_binding(g);
|
||||
if (!b || !b->has_stage) continue;
|
||||
std::vector<KVStageRun>& out = (*runs)[(size_t)g];
|
||||
out.clear();
|
||||
const RadKVStream* st = kv.stream_view(g);
|
||||
if (!st || st->block_bytes <= 0) continue;
|
||||
const int64_t blocks = kv.held_top_blocks(g);
|
||||
b->stage_live_bytes = blocks > 0 ? blocks * st->block_bytes : 0;
|
||||
if (stages && seqs) {
|
||||
tables.clear();
|
||||
for (const uint64_t q : *seqs) tables.push_back(&kv.block_table(q, g));
|
||||
kvstream_runs(tables, st->block_bytes, &out);
|
||||
if (!out.empty()) continue;
|
||||
}
|
||||
const int64_t top = kv.held_top_blocks(g);
|
||||
if (top > 0) out.push_back(KVStageRun{ 0, top * st->block_bytes });
|
||||
}
|
||||
}
|
||||
|
||||
void kvstream_bound_live(Ctx* c, const std::vector<std::vector<KVStageRun>>& runs) {
|
||||
if (!c) return;
|
||||
for (size_t g = 0; g < runs.size(); ++g) {
|
||||
KVPoolBinding* b = c->kv_binding((int)g);
|
||||
if (!b || !b->has_stage) continue;
|
||||
b->stage_runs = runs[g];
|
||||
}
|
||||
}
|
||||
|
||||
namespace {
|
||||
|
||||
/* A staged layer's copy: from its mirror row (by group-local position, not model layer) to the
|
||||
* pool base, where both views start. */
|
||||
/* A staged layer's copy: ranges of its mirror row (by group-local position, not model layer) to
|
||||
* the same offsets from the pool base, where both views start. */
|
||||
struct StageSrc {
|
||||
void* dst = nullptr;
|
||||
const uint8_t* src = nullptr;
|
||||
int64_t bytes = 0;
|
||||
std::vector<uint64_t> src, dst, len;
|
||||
int64_t bytes = 0; /* the ranges' total */
|
||||
};
|
||||
|
||||
bool stage_src(Ctx* ctx, int group, const RadKVGroupBatch* kvb, int layer, StageSrc* o) {
|
||||
@@ -133,12 +196,24 @@ bool stage_src(Ctx* ctx, int group, const RadKVGroupBatch* kvb, int layer, Stage
|
||||
if (!b || !st) return false;
|
||||
const int64_t li = ctx->kv_layer_index(group, layer);
|
||||
if (!st->host || st->block_bytes <= 0 || st->host_layer_stride <= 0 || li < 0) return false;
|
||||
o->dst = b->base;
|
||||
o->src = st->host + li * st->host_layer_stride;
|
||||
o->bytes = b->bytes;
|
||||
/* Only up to the held bound (stage.h, "Volume"). */
|
||||
if (b->stage_live_bytes > 0 && b->stage_live_bytes < o->bytes) o->bytes = b->stage_live_bytes;
|
||||
if (o->bytes <= 0 || o->bytes > st->host_layer_stride) o->bytes = st->host_layer_stride;
|
||||
const uint8_t* row = st->host + li * st->host_layer_stride;
|
||||
/* The stage holds one layer, and the mirror row is one layer of the same layout. */
|
||||
int64_t end = b->bytes;
|
||||
if (end <= 0 || end > st->host_layer_stride) end = st->host_layer_stride;
|
||||
o->src.clear(); o->dst.clear(); o->len.clear();
|
||||
o->bytes = 0;
|
||||
auto add = [&](int64_t off, int64_t n) {
|
||||
if (off >= end) return;
|
||||
n = std::min(n, end - off);
|
||||
if (n <= 0) return;
|
||||
o->src.push_back((uint64_t)(uintptr_t)(row + off));
|
||||
o->dst.push_back((uint64_t)(uintptr_t)((uint8_t*)b->base + off));
|
||||
o->len.push_back((uint64_t)n);
|
||||
o->bytes += n;
|
||||
};
|
||||
/* Only the step's ranges (stage.h, "Volume"); none set copies the row. */
|
||||
if (b->stage_runs.empty()) add(0, end);
|
||||
for (const KVStageRun& r : b->stage_runs) add(r.off, r.bytes);
|
||||
return o->bytes > 0;
|
||||
}
|
||||
|
||||
@@ -157,6 +232,8 @@ struct StagePipe {
|
||||
int64_t bytes = 0; /* what that list was told to move, for the pass's counter */
|
||||
};
|
||||
thread_local StagePipe g_pipe;
|
||||
/* The layer's ranges, rebuilt for each list: rad_xp_list writes them into its ring at once. */
|
||||
thread_local StageSrc g_src;
|
||||
thread_local bool g_warned_ride = false;
|
||||
|
||||
/* A list handed over by arm_and_submit() is normally waited for by the next kvstage_wait or
|
||||
@@ -184,11 +261,10 @@ bool arm_and_submit(Ctx* c, int group, int layer, const StageSrc& s, void* mark)
|
||||
arm.dst[0] = (void**)(void*)word;
|
||||
arm.val[0] = (void*)(uintptr_t)1;
|
||||
if (wtab_patch(arm, c->stream()) < 0) return false;
|
||||
const uint64_t src = (uint64_t)(uintptr_t)s.src, dst = (uint64_t)(uintptr_t)s.dst;
|
||||
const uint64_t bytes = (uint64_t)s.bytes;
|
||||
/* No yield: the compute stream waits on this copy, so yielding the link to a hold whose release
|
||||
* is behind that wait would deadlock (docs/KV-STREAMING.md §6.1). */
|
||||
if (rad_xp_list(c->device(), mark, 1, &src, &dst, &bytes, word, 0, RAD_XP_NO_YIELD) != RAD_OK)
|
||||
if (rad_xp_list(c->device(), mark, (int)s.len.size(), s.src.data(), s.dst.data(), s.len.data(),
|
||||
word, 0, RAD_XP_NO_YIELD) != RAD_OK)
|
||||
return false;
|
||||
g_pipe.inflight = layer;
|
||||
g_pipe.group = group;
|
||||
@@ -203,10 +279,16 @@ bool arm_and_submit(Ctx* c, int group, int layer, const StageSrc& s, void* mark)
|
||||
/* The copy on the compute stream: for a backend with no DMA queue, and when no ride is spare. */
|
||||
int serial_stage(Ctx* c, const StageSrc& s) {
|
||||
RadStream st = c->stream();
|
||||
const int rc = (s.bytes & 15) == 0
|
||||
? rad_memcpy_ranges_async(s.dst, s.src, s.bytes, nullptr, 0, st)
|
||||
: rad_memcpy_async(s.dst, s.src, s.bytes, st);
|
||||
return rc;
|
||||
for (size_t i = 0; i < s.len.size(); ++i) {
|
||||
void* d = (void*)(uintptr_t)s.dst[i];
|
||||
const void* f = (const void*)(uintptr_t)s.src[i];
|
||||
const int64_t n = (int64_t)s.len[i];
|
||||
const int rc = ((n | (int64_t)s.dst[i] | (int64_t)s.src[i]) & 15) == 0
|
||||
? rad_memcpy_ranges_async(d, f, n, nullptr, 0, st)
|
||||
: rad_memcpy_async(d, f, n, st);
|
||||
if (rc < 0) return rc;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
void count_stage(Ctx* c, int layer, int64_t bytes) {
|
||||
@@ -285,7 +367,7 @@ int kvstage_run(Ctx* c, int group, int layer, bool after) {
|
||||
count_stage(c, layer, moved);
|
||||
return 1;
|
||||
}
|
||||
StageSrc s;
|
||||
StageSrc& s = g_src;
|
||||
if (!stage_src(c, group, kvb, layer, &s)) {
|
||||
rad_step_fail(c, "kv streaming: a layer needs its prefill stage but the group has no host "
|
||||
"mirror row for it, so the attention would read an unstaged layer");
|
||||
@@ -326,7 +408,7 @@ int kvstage_run(Ctx* c, int group, int layer, bool after) {
|
||||
if (next < 0 || !dma_stage(c)) return 0;
|
||||
if (!g_pipe.done && rad_event_create_local(&g_pipe.done) < 0) g_pipe.done = nullptr;
|
||||
if (!g_pipe.done) return 0;
|
||||
StageSrc s;
|
||||
StageSrc& s = g_src;
|
||||
if (!stage_src(c, group, kvb, next, &s)) return 0;
|
||||
/* No spare ride: the next layer's wait copies it on the compute stream. */
|
||||
void* mark = nullptr;
|
||||
|
||||
+43
-18
@@ -36,23 +36,25 @@
|
||||
* copy at all, so the barriers above are the copy's whole ordering (core/runtime/issue.cpp,
|
||||
* haz_mark).
|
||||
*
|
||||
* Volume. The copy moves the mirror row up to the highest block id the pass can read, not the
|
||||
* whole row (`n_blocks * block_bytes` is the context allocation). The bound is
|
||||
* KVManager::held_top_blocks, one past the highest held block (kvstream_bound_live, per step), and
|
||||
* it must never be low: the attention would read whatever the previous layer left there, which is
|
||||
* fluent wrong text, not a fault. It is an upper bound because
|
||||
* Volume. The copy moves only the blocks the step's own block tables name, not the whole row
|
||||
* (`n_blocks * block_bytes` is the context allocation): each layer's list carries one range per
|
||||
* run of those ids (kvstream_runs), mirror offset to the same stage offset. The ranges must never
|
||||
* miss a block the pass reads: the attention would read whatever the previous layer left there,
|
||||
* which is fluent wrong text, not a fault. They cover every read because
|
||||
*
|
||||
* - every id a block table holds is held, and the held histogram counts sequence and
|
||||
* cache-retained blocks alike;
|
||||
* - the stage is identity-addressed from block 0, so copying [0, bound) covers every id below
|
||||
* it, dense or not;
|
||||
* - it is re-read every step, after the step's blocks are ensured, so a block a chunk appends or
|
||||
* a speculative token's block is inside it; a partial block is copied whole and its unwritten
|
||||
* - the pass's kernels reach the stage only through the step's block tables (the store through
|
||||
* the slots derived from them), so an id no table of the step names is never read;
|
||||
* - the stage is identity-addressed, block b at b * block_bytes, as the mirror row is;
|
||||
* - they are taken from the step's own sequences after its blocks are ensured
|
||||
* (kvstream_step_runs, per step), so a block a chunk appends, a prefix hit's cached blocks or a
|
||||
* speculative token's block is among them; a partial block is copied whole and its unwritten
|
||||
* tail is the mirror's zeros.
|
||||
*
|
||||
* Allocation is not assumed ascending: a retained or restored block can sit above a free one. The
|
||||
* bound counts every held block, so a server with a long cached conversation stages more than one
|
||||
* request reads; 0 (nothing held) stages the whole row.
|
||||
* Allocation is not assumed ascending or dense: the prefix cache keeps retained conversations'
|
||||
* blocks, often the low ids, and a new sequence takes ids above them, so a bound on the highest id
|
||||
* a step names would still copy every retained conversation below it. A step whose sequences are
|
||||
* not known (a batch the builder did not produce) or whose trunk pass takes the ring copies up to
|
||||
* KVManager::held_top_blocks, one past the highest held block; nothing held copies the whole row.
|
||||
*
|
||||
* A backend with no DMA queue (the host backend, a test) copies on the compute stream, in the same
|
||||
* order.
|
||||
@@ -61,6 +63,9 @@
|
||||
#include "mem/kv.h"
|
||||
#include "runtime/ctx.h"
|
||||
|
||||
#include <cstdint>
|
||||
#include <vector>
|
||||
|
||||
namespace rad {
|
||||
|
||||
/* Select the view of every streamed group the pass names and reset the stage's per-pass state.
|
||||
@@ -68,10 +73,30 @@ namespace rad {
|
||||
* step's view (core/sched/batch.cpp) does not link the driver. */
|
||||
void kvstream_enter(Ctx* c, const RadBatch* b);
|
||||
|
||||
/* Set every streamed group's stage bound from `kv` (rank 0's manager, which hands out the ids) for
|
||||
* the step about to run. Called for every rank from Engine::prepare_release, with the ranks parked
|
||||
* and the step's blocks ensured. */
|
||||
void kvstream_bound_live(Ctx* c, const KVManager& kv);
|
||||
/* At most this many ranges a layer's list: gaps of at most kStageGapBlocks are copied through, and
|
||||
* past the cap the smallest gaps are, so a fragmented table stays one short list. */
|
||||
constexpr int kStageMaxRuns = 256;
|
||||
constexpr int64_t kStageGapBlocks = 16;
|
||||
|
||||
/* Into `*out`, the ranges of a layer's row the block ids in `tables` occupy at `block_bytes` a
|
||||
* block: each table's runs of consecutive ids, sorted and joined where they overlap, touch or lie
|
||||
* at most kStageGapBlocks apart, then across the smallest remaining gaps until at most
|
||||
* kStageMaxRuns are left. Negative ids are skipped. Empty when no table names a block. Its
|
||||
* scratch is the calling thread's and keeps its capacity, so a step reuses it. */
|
||||
void kvstream_runs(const std::vector<const std::vector<int32_t>*>& tables, int64_t block_bytes,
|
||||
std::vector<KVStageRun>* out);
|
||||
|
||||
/* Into `*runs`, by group index, every group's ranges for the step `b` about to run (empty for a
|
||||
* group that does not stream): from the tables of `seqs`, the step's sequences, when its trunk
|
||||
* pass stages; otherwise [0, held_top_blocks) of `kv` (rank 0's manager, which hands out the
|
||||
* ids). The vectors are refilled in place. */
|
||||
void kvstream_step_runs(const KVManager& kv, const RadBatch* b, const std::vector<uint64_t>* seqs,
|
||||
std::vector<std::vector<KVStageRun>>* runs);
|
||||
|
||||
/* Install `runs` (kvstream_step_runs) as the step's stage ranges of every streamed group of `c`.
|
||||
* Called for every rank from Engine::prepare_release, with the ranks parked and the step's blocks
|
||||
* ensured. */
|
||||
void kvstream_bound_live(Ctx* c, const std::vector<std::vector<KVStageRun>>& runs);
|
||||
|
||||
/* The driver, also re-run by a recorded pass (Ctx::tape_kv_stage). `after` is the call after the
|
||||
* layer's attention (rad_kv_stage_next) rather than before its store. */
|
||||
|
||||
Reference in new issue
Block a user