Archived
merge origin/main: the upstream LoRA-runtime refactor beneath the ref2va port
Merges upstream 1.10.0 (152 commits: the LoRA acquire/runtime refactor, the
form-1 LTX-2 scheduler family, guidance terms + negative prompts, decoder
selection, input_reference, new architectures) into the ref2va port branch.
Resolution rule throughout: keep BOTH feature sets; ABI numbering follows
upstream (RAD_ABI_VERSION 26, RAD_FORMAT_VER 2), with the port's video fields
unioned into RadVideoGenBatch/RadVideoGenDecl and abi_layout_table.h
regenerated from the live table.
Notable reconciliations:
* videos.cpp: the task grammars are disjoint by capability -- keyframe tasks
(i2va/l2va/flash-attn l2va/fl2va) are recognized only when decl.encodes,
so upstream models keep refusing them as unknown tasks; input_reference,
the LoRA tag/field pipeline, and the guidance/negative_prompt rendering
coexist with refs/ref2va; the prompt put() helper hoisted to block scope
for the media branch.
* video_schedule(): upstream's (steps, video_tokens, refine) keeps its
positional slots; the port's shift_video/shift_audio overrides move to the
tail so upstream's schedule tests call unchanged.
* r4d_selftest conv3d cases: the port's sp/st/causal/down/refl geometry and
upstream's tpad/tpre fold into one reference (ft = causal ? 2 : tpad==2 ?
2+tpre : 1); rms_mod rows keep the port's i8/fp8 quant modes alongside
upstream's wadd/norm_once/norm parameters.
* tests/oot_plugins.sh: the per-plugin cmake --install gains a --prefix
staging dir -- plugin .so files still land in the absolute
RAD_PLUGIN_INSTALL_HOME, but libr4d now also installs r4d_selftest to a
relative bin/, which needs no root.
Host ctest: 112/113 (mm_test's webp gap pre-exists this merge); r4d_selftest,
engine_e2e, oot_plugins, abi_layout, all LoRA tests green.
Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
commit
a1a75da7e9
415 files changed
+78837
-5310
No files matched your search
+12
-1
@@ -207,10 +207,15 @@ public:
|
||||
/* Call once on the rank thread before its first run_step: the backend's current device is
|
||||
* thread-local, and init may have run on another thread. */
|
||||
int bind_thread();
|
||||
/* The runtime LoRA slot every row of the generator passes that follow runs with, -1 for none
|
||||
* (Ctx::issue_lora). Set by the pass loop before it releases the rank for a pass. */
|
||||
void set_gen_lora_slot(int32_t s) { gen_lora_slot_ = s; }
|
||||
|
||||
/* ---------------------------------------------------------- run-phase queries */
|
||||
const RadBatch* batch() const { return batch_; }
|
||||
int rank() const { return rank_; }
|
||||
/* Whether repeated passes are recorded and played back (prepare() says when they are not). */
|
||||
bool records_passes() const { return tape_on_; }
|
||||
int world_size() const { return world_size_; }
|
||||
RadStream stream() const { return stream_; }
|
||||
Program* program() const { return program_; }
|
||||
@@ -354,6 +359,7 @@ private:
|
||||
int bind_weights();
|
||||
int bind_ops();
|
||||
int issue_lora(rad_op h, const RadOperand* opd, int n_opd, int64_t n);
|
||||
int32_t gen_lora_slot_ = -1;
|
||||
int bind_routing();
|
||||
int bind_profiling();
|
||||
int check_domain(rad_op h, int domain) const;
|
||||
@@ -685,7 +691,12 @@ private:
|
||||
int level_ = 0;
|
||||
std::vector<RadTensor> w_tmpl_;
|
||||
std::vector<int32_t> w_bits_;
|
||||
std::vector<uint32_t> waited_gen_; /* the generation we last made the stream wait on */
|
||||
/* The generation each lane's stream was last made to wait on, a weight. Per lane: the wait
|
||||
* orders only the stream it is put on, so a weight resolved on lane 1 (the Gemma 4 26B-A4B's
|
||||
* dense arm, which a decode step issues on lane 1 and an overlapped prefill on lane 0) must
|
||||
* still be waited on when lane 0 resolves it. Indexed by lane_, like the other per-lane state
|
||||
* here: set_lane admits lanes 0 and 1 only. */
|
||||
std::vector<uint32_t> waited_gen_[2];
|
||||
|
||||
std::vector<OpPlan> plans_;
|
||||
/* Ops not yet seen issued. flush_issued walks only these and drops each once it fires. */
|
||||
|
||||
Reference in new issue
Block a user