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
@@ -140,6 +140,7 @@ public:
|
||||
int op_reads (rad_op h, const rad_buf* b, int n);
|
||||
int op_writes(rad_op h, const rad_buf* b, int n);
|
||||
int buf_concurrent(rad_buf b);
|
||||
int lane1_window(bool end);
|
||||
int weight_shard_span(rad_weight w, int64_t lo, int64_t hi);
|
||||
int weight_shard_span_parts(rad_weight w, const int64_t* lo, const int64_t* hi,
|
||||
const int64_t* total, int n);
|
||||
@@ -220,6 +221,8 @@ private:
|
||||
/* Buffers touched from the second lane (rad_buf_concurrent). Their declared op range does not
|
||||
* bound when their bytes are in use, so they are live for the whole program. */
|
||||
std::set<rad_buf> concurrent_bufs_;
|
||||
/* The second lane's window (rad_lane1_window_begin), first and last op handle; -1 when none. */
|
||||
int32_t lane1_w0_ = -1, lane1_w1_ = -1;
|
||||
|
||||
/* Parallel to prog_.kv_groups: where in the op list the group was declared, and the op found
|
||||
* to consume it. Declaration order is the only link between an op and a group; see
|
||||
|
||||
Reference in new issue
Block a user