radiance 1.0.9

- Pinned host memory is locked in pieces of at most 1 GiB (issue 13): an Intel VT-d host in
  scalable mode that refuses any single pin above about 2.5 GiB now takes the host pool with IOMMU
  translation, and peer-to-peer access, left on.
- Four-rank all-reduce (PR 11 by keptn42): the tiered-int8 wire serves in-place calls, so
  --tp 4 --tp-wire wht6 runs. At four and eight ranks the exact all-reduce is one-shot up to
  524288 elements and two-shot above, chosen by the selector, so the band report names the kernel
  that runs. The docs and the startup warning describe the four-rank lossy wire; eight ranks have
  none.
- A VRAM allocation the card cannot take is refused, saying what the card has left and which
  processes hold memory on it. ROCm 7.2's runtime crashes on such an allocation once a queue has
  been destroyed, which every startup does.
- rad-convert --changed FILE: with --reuse, converts only the weights that read a changed
  checkpoint tensor and copies the rest.
This commit is contained in:
Deadcode committed 2026-10-05 12:16:54 +02:00
1 parent 3e0c114cd7
commit 20d6c2119f
24 files changed
+707 -134

No files matched your search

+32
View File
@@ -16,6 +16,7 @@
#include <string>
#include <sys/stat.h>
#include <unistd.h>
#include <unordered_set>
#include <vector>
using namespace rad;
@@ -262,6 +263,37 @@ TEST(an_expert_is_its_slice_of_a_stack) {
remove_checkpoint(dir);
}
/* A CHANGED TENSOR IS NAMED AS THE CHECKPOINT NAMES IT. An expert is a slice "exps[2]" of its
* stack, and it reads "exps"; a block-FP8 weight reads its scale plane as well as its codes, so a
* changed scale changes the weight. */
TEST(a_weight_reads_the_checkpoint_tensors_its_pieces_and_scales_come_from) {
const std::string dir = write_checkpoint(
{ bf16("exps", { 4, 2, 3 }, 0.0f), fp8("q.weight", { 2, 128, 128 }),
bf16("q.weight_scale_inv", { 2, 1, 1 }, 7.0f), bf16("a.weight", { 2, 3 }, 0.0f),
bf16("b.weight", { 2, 3 }, 0.0f) }, kConfig);
Checkpoint ck;
REQUIRE_EQ(ck.open(dir), RAD_OK);
Program prog;
prog.name_map.push_back(map("e2", RAD_MAP_COPY, { "exps" }, { 2 }));
prog.name_map.push_back(map("q1", RAD_MAP_COPY, { "q.weight" }, { 1 }));
prog.name_map.push_back(map("ab", RAD_MAP_CONCAT, { "a.weight", "b.weight" }));
CkptWeight e2, q1, ab;
std::string why;
REQUIRE_EQ(ckpt_resolve(ck, prog, "e2", false, &e2, &why), RAD_OK);
REQUIRE_EQ(ckpt_resolve(ck, prog, "q1", false, &q1, &why), RAD_OK);
REQUIRE_EQ(ckpt_resolve(ck, prog, "ab", false, &ab, &why), RAD_OK);
CHECK_EQ(ckpt_tensor_of(*e2.pieces[0]), std::string("exps"));
std::unordered_set<std::string> hit;
CHECK(ckpt_reads_any(e2, { "exps" }, &hit));
CHECK(!ckpt_reads_any(e2, { "exps[2]" })); /* a slice is not a checkpoint name */
CHECK(ckpt_reads_any(q1, { "q.weight_scale_inv" }, &hit));
CHECK(ckpt_reads_any(ab, { "b.weight" }, &hit)); /* one changed piece of a join */
CHECK(!ckpt_reads_any(ab, { "q.weight", "exps" }));
CHECK_EQ(hit.size(), (size_t)3);
remove_checkpoint(dir);
}
/* A COPY's sources are alternatives, first present wins: a tied head reads the embedding where
* the checkpoint ships no head of its own. */
TEST(alternatives_take_the_first_tensor_present) {