E6003
E6003 — A value is used from a topology that cannot see the memory space it lives in. The diagnostic names the value's space, the visible set of the topology reading it, and the cost of the transfer that would fix it — so a misplaced handoff (an un-transferred KV cache in a disaggregated prefill/decode split, say) is a compile error that carries its own remedy. Amanaged: cachedspace the topology can reach across a declared seam is coherent in hardware and is not reported here. A move of a tensor reads no element, so alet, an argument, a store or areturnof it is allowed.
What the compiler reports
Error[E6003] at {{.*}}transfer_wrong_topology.vx:6:11: 'device_data' lives in CPU_DRAM but NPU[0] sees only [NPU_HBM]
1 error(s) emitted
The fragments the test suite holds the compiler to. An ellipsis marks text the test does not constrain; the emitted message also carries a source location.
A program that triggers it
fn main(host_data: Tensor<f32, [?, ?]>) on Topology::NPU[0] -> i32 {
let device_data = transfer(host_data, Memory::CPU_DRAM);
let x = device_data[0];
return 0;
}
From tests/frontend/fail/transfer_wrong_topology.vx, which asserts this diagnostic on every commit.
Related
Topologies and memoryThe chapter covering the rule this code enforces.
All diagnosticsEvery code the compiler can emit, grouped by stage.
E6002Cannot transfer between memory spaces (no hardware path)
E6004Transfer violates the boundary contract at a seam (per-seam local-completeness / soundness obligation is
sat; a stale read can violate the contract).