E6002
E6002 — Cannot transfer between memory spaces (no hardware path)
What the compiler reports
E6002 … Cannot transfer from CPU_DRAM to Island … no hardware path
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
//
// Part of the Vx Project, under the Apache License v2.0 with LLVM Exceptions.
// See LICENSE for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
// A `transfer` is only legal when a hardware path exists between the source and target memory
// spaces (the transfer cost graph is searched with Dijkstra, and sub-spaces resolve through their
// `within:` ancestors). `Island` is a custom root space with no declared `within:` and no transfer
// edges, so it is unreachable from the host (CPU_DRAM) -- the transfer is a compile error rather
// than a silent no-op.
//
Memory Island {}
fn main() -> i32 {
let t = Tensor<f32>([[1.0, 2.0], [3.0, 4.0]]);
let s = transfer(t, Memory::Island);
return 0;
}
// The code is pinned, not just the words. E6002 was declared and emitted
// nowhere, so the compiler could not produce it while this diagnostic -- the one
// it names -- carried no code at all and printed as a bare `Error:`.
From tests/frontend/fail/transfer_no_path.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.
E6001Topology mismatch in function call
E6003A 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.