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. A managed: cached space 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 a let, an argument, a store or a return of 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