Archived
merge 1.12.0: gemma4 E2B/E4B and Nemotron Bolt E4B arrive; the ref2va audio, rows and ABI work carried across
conv1d keeps both stride forms: upstream's causal codec downsample with cu_div (Fish Audio) and the port's explicit-pad non-causal one (the H3 audio encoder's), in libref, libavx and libr4d alike; the ABI takes upstream's 27 on top of the port's RadVideoGenBatch growth.
This commit is contained in:
commit
7c3b5ab7d5
285 files changed
+30500
-2898
No files matched your search
+17
-5
@@ -153,13 +153,20 @@ int Ctx::bind_arena() {
|
||||
int64_t dev_bytes = 0, total = 0;
|
||||
arena_plan_bytes(P, &dev_bytes, &total);
|
||||
|
||||
RAD_TRY(arena_.init(dev_bytes, P.scratch_bytes, RAD_MEM_DEVICE, std::max(P.scratch_regions, 1)));
|
||||
RAD_TRY(arena_.init(dev_bytes, P.scratch_bytes, RAD_MEM_DEVICE, std::max(P.scratch_regions, 1),
|
||||
P.scratch_bytes_lane1));
|
||||
/* The arena is in no pool and scales with max_tok, so core/mem/vram_budget.cpp charges it by
|
||||
* name rather than leaving it to --gpu-headroom-mib. This log line must agree with that
|
||||
* charge. */
|
||||
RAD_INFO("arena: %s device + %d x %s scratch = %s, charged to the VRAM budget before it was "
|
||||
"split", humanb(dev_bytes).c_str(), arena_.scratch_regions(),
|
||||
humanb(P.scratch_bytes).c_str(), humanb(total).c_str());
|
||||
if (arena_.scratch_regions() > 1)
|
||||
RAD_INFO("arena: %s device + %s scratch + %s for the second lane = %s, charged to the VRAM "
|
||||
"budget before it was split", humanb(dev_bytes).c_str(),
|
||||
humanb(P.scratch_bytes).c_str(), humanb(arena_.scratch_bytes(1)).c_str(),
|
||||
humanb(total).c_str());
|
||||
else
|
||||
RAD_INFO("arena: %s device + %s scratch = %s, charged to the VRAM budget before it was "
|
||||
"split", humanb(dev_bytes).c_str(), humanb(P.scratch_bytes).c_str(),
|
||||
humanb(total).c_str());
|
||||
|
||||
if (host_hw > 0) {
|
||||
/* RAD_MEM_HOST_MAPPED, not RAD_MEM_HOST: nothing copies between the two arenas, so device
|
||||
@@ -333,6 +340,8 @@ int Ctx::bind_ops() {
|
||||
p.billed = (oi.op == "all_reduce");
|
||||
p.collective = p.billed;
|
||||
p.lora_site = oi.lora_site;
|
||||
p.order = oi.anchor > 0 && (size_t)oi.anchor < P.ops.size() ? P.ops[(size_t)oi.anchor].index
|
||||
: oi.index;
|
||||
|
||||
for (const Band& b : oi.bands) band_table_.push_back(b.hi);
|
||||
|
||||
@@ -908,6 +917,7 @@ int Ctx::lane_join(int from, int to) {
|
||||
RAD_TRY(rad_event_record(lane_ev_[from], fs));
|
||||
RAD_TRY(rad_event_wait(ts, lane_ev_[from]));
|
||||
scratch_open_[from] = false; /* `to` is now behind every scratch user `from` issued */
|
||||
if (from == 1 && to == 0) lane1_pending_ = false;
|
||||
return RAD_OK;
|
||||
}
|
||||
|
||||
@@ -918,7 +928,7 @@ int Ctx::lane_join(int from, int to) {
|
||||
* field added to RadBatch changes its size: decide whether the key must read it, then update the
|
||||
* size here. `agen_b` and `vgen_b` are set only on generator passes, which are never recorded
|
||||
* (below). */
|
||||
static_assert(sizeof(void*) != 8 || sizeof(RadBatch) == 336,
|
||||
static_assert(sizeof(void*) != 8 || sizeof(RadBatch) == 360,
|
||||
"RadBatch changed: check that Ctx::pass_key reads every new field a pass depends on");
|
||||
static_assert(sizeof(void*) != 8 || sizeof(RadKVGroupBatch) == 72,
|
||||
"RadKVGroupBatch changed: check that Ctx::pass_key reads every new field");
|
||||
@@ -949,6 +959,8 @@ uint64_t Ctx::pass_key(const RadBatch* b) const {
|
||||
/* Null on a step with no adapter row, which then issues no adapter op (Ctx::issue_lora): the
|
||||
* two are different passes. The slots themselves are read on the card. */
|
||||
ptr(b->lora_slot);
|
||||
/* Zero issues no projection op (RadBatch::control_vector). */
|
||||
mix((uint64_t)b->control_vector);
|
||||
for (int g = 0; g < b->n_kv_groups; ++g) {
|
||||
const RadKVGroupBatch& k = b->kv[g];
|
||||
mix((uint64_t)k.group); ptr(k.slot_mapping); ptr(k.block_table);
|
||||
|
||||
Reference in new issue
Block a user