E6016
E6016 — ATopologyorMemorydeclaration whose identity cannot be relied on. Two forms: the declared name shadows a built-in topology (every use ofTopology::<Name>resolves to the built-in, so the declaration is silently ignored — including itsarch:); or two declared names collide on one dispatch id (custom ids are derived from the name by hashing), in which case which declaration is in force would be hash-iteration order — observed as the same program getting a device image on some runs and not others for a topology, and as atransfercarrying the other space's capacity and granule for a memory space.
What the compiler reports
E6016
shadows the built-in topology
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
// Declaring a topology named after a built-in is refused: the parser resolves
// `Topology::GPU` to the built-in unconditionally, so the declaration -- including its
// `arch:` -- would be silently ignored at every use site (Vx#352 review finding: a file
// declaring `arch: applegpu` under this name still produced an NVPTX image via the band).
Memory CPU_DRAM {}
Memory GPU_HBM {
within: Memory::CPU_DRAM, capacity: 40 GiB, bandwidth: 3 TB/s, managed: cached
}
Topology GPU {
arch: applegpu,
memory: Memory::GPU_HBM,
visible: [Memory::GPU_HBM],
transfer Memory::CPU_DRAM -> Memory::GPU_HBM : 63 GB/s
}
fn main() -> i32 {
return 0;
}
From tests/middle_end/fail/topology_shadows_builtin.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.
E6015A structurally invalid transfer lowering (
impl transfer A -> B { ... }): the same edge implemented twice in one compilation (which one is in force would be load order), or a lowering with no functions (an empty body cannot move anything, and accepting it would make impl transfer an inert annotation rather than code).
E6017A misuse of the raw:: transfer-lowering primitives (Vx#353): a raw:: call outside an impl transfer body, an unknown primitive name, a tile argument that is not a bare parameter name (the primitives are indexed, not addressed), a store into a tile not held by &mut, or a wrongly typed index/value.