abi, sched: placeholder runs read both ways

An encoder states that the language model reads a picture's or video
frame's placeholders both ways (RadEncoderDecl::bidirectional). The
scheduler then ends no prefill chunk inside such a run, and a trunk
pass names its runs and the keys their rows see (RadBatch::n_bidi).
Fields appended; such a pass is not recorded.
This commit is contained in:
keptn42 committed 2026-11-04 07:20:43 +01:00
1 parent 81be3cb63d
commit da7b911c64
10 files changed
+246 -12

No files matched your search

+5
View File
@@ -226,6 +226,10 @@ private:
* mm_rows): carved only when the program declared an encoder, empty otherwise. */
int32_t *h_rope = nullptr, *d_rope = nullptr;
int32_t *h_mmrow = nullptr, *d_mmrow = nullptr;
/* [4][max_tok] the runs read both ways (RadBatch::n_bidi): their key counts (the one plane
* the device reads), first rows, rows and sequences; carved only when the program's
* encoder asks for them (RadEncoderDecl::bidirectional). */
int32_t *h_bidi = nullptr, *d_bidi = nullptr;
/* [n_tok] each row's runtime LoRA adapter slot (RadBatch::lora_slot): carved only when the
* engine serves adapters, empty otherwise. */
int32_t *h_lora = nullptr, *d_lora = nullptr;
@@ -345,6 +349,7 @@ private:
* (see RadBatch::mm_embd). The staging is refilled only after its last upload has run
* (`mm_ev_`). */
bool mm_on_ = false;
bool bidi_on_ = false; /* RadEncoderDecl::bidirectional */
/* The engine serves runtime LoRA adapters (Config::lora): the batch carries each row's slot. */
bool lora_on_ = false;
/* Program::plugin_words: the words a sequence may carry, 0 for none. */