Archived
runtime: an op that names no buffer is not held to the second lane's window
The window keeps lane 1's concurrent buffers live only across it. A weight read into the cache (prefetch_beside) names no buffer, so it touches nothing the window protects: it may run on lane 1 outside the window (a DFlash2 drafter's reads come after the trunk's window), and it leaves no window work for lane 0 to join. runtime_test covers it. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
1 parent
c9f79c32d8
commit
de53cd18c1
2 files changed
+27
-3
No files matched your search
@@ -993,6 +993,26 @@ TEST(an_op_outside_the_window_on_lane_0_joins_the_second_lane_first) {
|
||||
}));
|
||||
}
|
||||
|
||||
/* An op that names no buffer -- a weight read into the cache (prefetch_beside) -- touches nothing the
|
||||
* window keeps live, so on lane 1 it runs outside the window too (a drafter's reads beside its
|
||||
* all-reduces come after the trunk's window). */
|
||||
TEST(an_op_naming_no_buffer_runs_on_the_second_lane_outside_its_window) {
|
||||
Fixture f;
|
||||
f.P.scratch_regions = 2;
|
||||
rad_weight w = f.add_weight("blk.0.w", RAD_BF16, 8, 4, g_weight_bytes);
|
||||
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, { w });
|
||||
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_W(w) };
|
||||
CHECK_OK(c.set_lane(1));
|
||||
CHECK_OK(c.issue(a1, opd, 1, RAD_N_BATCH));
|
||||
CHECK_OK(c.set_lane(0));
|
||||
}));
|
||||
}
|
||||
|
||||
/* 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