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
a topology cannot be called `Any`

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

// `on Topology::Any` means that a function runs where it is called, so no topology can have
// the name `Any`.
Memory CPU_DRAM {}
Memory WIDE {
  capacity: 1 GiB, managed: explicit, scope: device
}
Topology Any {
  memory: Memory::WIDE,
  transfer Memory::CPU_DRAM -> Memory::WIDE : 64 GB/s
}

fn main() -> i32 {
  return 0;
}

From tests/middle_end/fail/a_topology_cannot_be_called_any.vx, which asserts this diagnostic on every commit.

Related