E6016

E6016 — A Topology or Memory declaration whose identity cannot be relied on. Two forms: the declared name shadows a built-in topology (every use of Topology::<Name> resolves to the built-in, so the declaration is silently ignored — including its arch:); 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 a transfer carrying 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