Archived
the second lane's window (rad_lane1_window_begin / _end): concurrent buffers live across it, not the whole program
rad_buf_concurrent held a buffer for the whole program because the planner cannot tell when lane 1 runs. An architecture whose lane-1 work lies in one stretch of its declared ops now declares it, and its concurrent buffers live across that window and their own uses, so the drafter's and the heads' buffers share their bytes again. Ctx holds it: an op on lane 1 outside the window fails the step by name, and the first lane-0 op past it joins lane 1 first when work is pending there. qwen35_fp8 and gemma3 declare it from the embedding's all-reduce to the final norm. Qwen3.8 + DFlash2 at 64 sequences with speculation: activation arena 633.99 -> 526.32 MiB a card, upstream's exactly (with the second lane's own scratch region, KV 86208 -> 93856 tokens against upstream's 95520). arch_test's fake builder applies the window too, so the pinned steps check every plugin touches its concurrent buffers only inside it. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
1 parent
0c813784a0
commit
0d2b502d51
13 files changed
+201
-6
No files matched your search
@@ -592,6 +592,23 @@ int Ctx::issue_body(rad_op h, const RadOperand* opd, int n_opd, int64_t n) {
|
||||
? "has no host kernel for this band, and the placement planner put "
|
||||
"it on the host anyway"
|
||||
: "has no device kernel for this band");
|
||||
/* The second lane's window (rad_lane1_window_begin): its concurrent buffers are live only across
|
||||
* it, so lane 1 runs nothing outside it, and lane 1 is joined before lane 0 runs past it. */
|
||||
if (program_ && program_->lane1_w1 >= 0) {
|
||||
if (lane_ == 1 && (p.order < program_->lane1_w0 || p.order > program_->lane1_w1))
|
||||
return abort_step_msg(h, RAD_E_STATE,
|
||||
fmt("issued on the second lane outside its declared window (ops "
|
||||
"%d..%d, this one %d): the buffers it may touch there are "
|
||||
"live only across the window",
|
||||
(int)program_->lane1_w0, (int)program_->lane1_w1, (int)p.order));
|
||||
if (lane_ == 0 && lane1_pending_ && p.order > program_->lane1_w1) {
|
||||
const int js = lane_join(1, 0);
|
||||
if (js < 0)
|
||||
return abort_step_msg(h, js, "joining the second lane at its window's end failed");
|
||||
}
|
||||
}
|
||||
if (lane_ == 1) lane1_pending_ = true;
|
||||
|
||||
/* The row's DIV on the ranged parameter held at the band's upper bound, maybe not here. */
|
||||
if (ip.ranged_div > 1 && n % ip.ranged_div != 0)
|
||||
return abort_step_msg(h, RAD_E_SHAPE,
|
||||
|
||||
Reference in new issue
Block a user