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
@@ -937,6 +937,34 @@ TEST(a_second_lane_scratch_request_past_its_region_is_refused_by_name) {
|
||||
CHECK(std::strstr(f.ctx.step_error(), "rad_buf_concurrent") != nullptr);
|
||||
}
|
||||
|
||||
/* The second lane's window holds at issue: an op on lane 1 outside it fails the step by name; inside
|
||||
* it runs. */
|
||||
TEST(an_op_on_the_second_lane_outside_its_window_is_refused_by_name) {
|
||||
Fixture f;
|
||||
f.P.scratch_regions = 2;
|
||||
rad_buf x = f.add_buffer("x", RAD_BF16, 64, 4, 0);
|
||||
rad_op a0 = f.add_op("gemm_nt", "M", { 8192 }, { k_scr_seen0 }, { "s0" }, nullptr, {});
|
||||
rad_op a1 = f.add_op("gemm_nt", "M", { 8192 }, { k_scr_seen1 }, { "s1" }, nullptr, {});
|
||||
f.P.lane1_w0 = f.P.lane1_w1 = (int32_t)a0;
|
||||
CHECK_OK(f.start());
|
||||
|
||||
CHECK_OK(f.step(4, 0, [&](Ctx& c) {
|
||||
RadOperand opd[1] = { RAD_B(x) };
|
||||
CHECK_OK(c.set_lane(1));
|
||||
CHECK_OK(c.issue(a0, opd, 1, RAD_N_BATCH));
|
||||
CHECK_OK(c.set_lane(0));
|
||||
CHECK_OK(c.issue(a1, opd, 1, RAD_N_BATCH)); /* past the window: joins lane 1 first */
|
||||
}));
|
||||
const int s = f.step(4, 1, [&](Ctx& c) {
|
||||
RadOperand opd[1] = { RAD_B(x) };
|
||||
CHECK_OK(c.set_lane(1));
|
||||
c.issue(a1, opd, 1, RAD_N_BATCH);
|
||||
CHECK_OK(c.set_lane(0));
|
||||
});
|
||||
CHECK_EQ(s, RAD_E_STATE);
|
||||
CHECK(std::strstr(f.ctx.step_error(), "outside its declared window") != nullptr);
|
||||
}
|
||||
|
||||
/* Operands are positional (spec §2.3), so a miscount is silent numerical garbage at the kernel,
|
||||
* not a diagnosable failure. The runtime checks the given arity against the schema. */
|
||||
TEST(operand_arity_is_checked_against_the_schema) {
|
||||
|
||||
Reference in new issue
Block a user