Archived
radiance 1.0.10
- Four-rank Qwen3.8-Flash-Next (PRs 14 and 16 by keptn42): the all-reduce runs fused with the hyper-connection's write, and with the MoE gather in front of it, on decode and verify steps on the exact wire. The routed experts are split in four classes, so every rank computes the same share; moe_gemm_q_mod4 is the new grouped GEMM. The oracle now checks moe_gemm_q on w4nl and w5nl containers. - --embedding-placement and --ngram-placement, each auto | vram | ram | disk. The token embedding can live in the pinned host pool, read in place over the link (from PR 17 by mechkbfan). An n-gram table can be copied into locked RAM at load instead of read from the container (from PR 15 by keptn42). auto takes the fastest tier with room once every other weight is placed, and startup prints what it chose and why. A tier that cannot be honoured stops the start with the reason; the embedding on disk and the n-gram table in VRAM are refused, since nothing can serve them. - The expert_tiered placement no longer spends the pinned host pool twice when it falls back to layer offload, and a lossy-wire request for a four-rank fused write is a selection miss rather than a startup abort.
This commit is contained in:
1 parent
2f56e3c477
commit
e466fa07e2
56 files changed
+1804
-761
No files matched your search
+58
-3
@@ -119,8 +119,8 @@ TEST(loading_reads_identity_and_calls_open) {
|
||||
if (!base) return;
|
||||
CHECK_EQ((int)base->kind, RAD_PLUGIN_KERNEL);
|
||||
CHECK_EQ(base->version, "0.1");
|
||||
CHECK_EQ(base->n_kernels, 16);
|
||||
CHECK_EQ(base->n_schemas, 9);
|
||||
CHECK_EQ(base->n_kernels, 17);
|
||||
CHECK_EQ(base->n_schemas, 10);
|
||||
|
||||
/* The optional open hook runs once, after load and before any selection. */
|
||||
auto open_calls = reinterpret_cast<int (*)(void)>(dlsym(base->handle, "radtest_open_calls"));
|
||||
@@ -286,7 +286,7 @@ TEST(every_row_s_op_has_a_schema) {
|
||||
CHECK_OK(load(r));
|
||||
CHECK_OK(r.check_complete());
|
||||
const auto ops = r.op_names();
|
||||
CHECK_EQ(ops.size(), (size_t)9);
|
||||
CHECK_EQ(ops.size(), (size_t)10);
|
||||
CHECK_EQ(ops[0], "t_attn");
|
||||
}
|
||||
|
||||
@@ -881,4 +881,59 @@ TEST(libr4d_resolves_the_all_reduce_by_message_size) {
|
||||
}
|
||||
}
|
||||
|
||||
/* THE FOUR-RANK FUSED WRITES SERVE THE EXACT WIRE ONLY, AND SAY SO IN SELECTION. A caller states
|
||||
* `wire` 0 for the exact form and gets the four-rank rows; a request for the rotated wire at four
|
||||
* ranks is a miss that names `wire`, so the caller keeps its unfused pair -- not a row that
|
||||
* matches and then refuses its instance, which would stop declare. At two ranks both wires keep
|
||||
* their row. Geometry is Qwen3.8-Flash-Next's: 2560 wide, four streams, top-k 10, declared over a
|
||||
* decode or verify step of 8 sequences at depth 3. */
|
||||
TEST(libr4d_resolves_the_four_rank_fused_writes_on_the_exact_wire_only) {
|
||||
const std::string so = home() + "/kernels/libr4d.so";
|
||||
if (access(so.c_str(), R_OK) != 0) {
|
||||
fprintf(stderr, " SKIP %s: no %s (a build without HIP)\n", ::radtest::current(),
|
||||
so.c_str());
|
||||
return;
|
||||
}
|
||||
Registry r;
|
||||
CHECK(r.load_plugin(so, 0) >= 0);
|
||||
r.set_device_fact(RAD_FACT_P2P, 1);
|
||||
|
||||
const int64_t rows = 8 * (1 + 3);
|
||||
auto bands = [&](const std::string& op, int world, int wire) {
|
||||
Geometry g;
|
||||
g.set_i("n", 2560);
|
||||
g.set_i("hc", 4);
|
||||
g.set_i("world_size", world);
|
||||
g.set_s("dtype", "bf16");
|
||||
g.set_i("wire", wire);
|
||||
if (op == "ar_gather_hc_write") {
|
||||
g.set_i("top_k", 10);
|
||||
g.set_s("act", "sigmoid");
|
||||
}
|
||||
return r.build_bands(op, "M", 1, rows, g);
|
||||
};
|
||||
auto names = [](const std::vector<Band>& b) {
|
||||
std::string s;
|
||||
for (const Band& x : b)
|
||||
s += fmt("%lld:%s ", (long long)x.hi, picked(x.dom[RAD_DOMAIN_DEVICE].row).c_str());
|
||||
return s;
|
||||
};
|
||||
|
||||
CHECK_EQ(names(bands("ar_hc_write", 4, 0)), "32:ar_hc_write_4rank ");
|
||||
CHECK_EQ(names(bands("ar_gather_hc_write", 4, 0)), "32:ar_gather_hc_write_4rank ");
|
||||
for (int wire : { 0, 6 }) {
|
||||
CHECK_EQ(names(bands("ar_hc_write", 2, wire)), "32:ar_hc_write ");
|
||||
CHECK_EQ(names(bands("ar_gather_hc_write", 2, wire)), "32:ar_gather_hc_write ");
|
||||
}
|
||||
|
||||
for (const char* op : { "ar_hc_write", "ar_gather_hc_write" }) {
|
||||
const std::vector<Band> none = bands(op, 4, 6);
|
||||
CHECK(!none.empty());
|
||||
for (const Band& b : none) {
|
||||
CHECK(!b.dom[RAD_DOMAIN_DEVICE]);
|
||||
CHECK(has(b.miss[RAD_DOMAIN_DEVICE], "wire"));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
RAD_TEST_MAIN()
|
||||
Reference in new issue
Block a user