builder: narrow an f32 source to a bf16 declaration at load

The builder accepted one conversion direction beyond the exact widening it already did: a single-plane RAD_F32 source declared RAD_BF16 is rounded to nearest even at load (WeightInfo::narrow, beside widen). It is staged like a widened weight, never read in place from the container, and the planner and oracle treat it as 'not the container's stored bytes'. build_test covers the declaration, the stored dtype and size, and that it is not file-direct.
This commit is contained in:
Boris Manojlovic authored and StillDeadcode committed 2026-10-27 20:59:42 +01:00
1 parent fd40bb430c
commit 6c33ee4e12
6 files changed
+79 -32

No files matched your search

+3 -3
View File
@@ -313,7 +313,7 @@ void Planner::pin_mapped(const Program& prog, Plan* p) {
"directly has none; convert it to a container");
else if (!stored)
note_unfit(p, mu, "it must be read from the container's mapping, and its stored form "
"is not the container's (a relayout, a widening or a shard)");
"is not the container's (a relayout, a dtype conversion or a shard)");
if (host_only)
for (rad_weight w : mu.weights)
if (w < device_ok_.size() && device_ok_[w])
@@ -698,8 +698,8 @@ int Planner::assign_expert_tiered(Plan* p) {
/* With the file tier on, only a non-file-direct unit gets here (HostFall::place). */
note_unfit(p, mu, ssd_ ? "neither VRAM nor the host pool has room, and its "
"stored form is not the container's (a relayout, a "
"widening or a shard), so the file tier cannot read it "
"in place"
"dtype conversion or a shard), so the file tier cannot "
"read it in place"
: "the host pool is full and no --weights-disk-tier was "
"given");
rc = RAD_E_NOMEM;