E6012

E6012 — The same Memory or Topology name is declared by two compilation inputs (e.g. a --machine file and the program). Declarations are name-keyed, so one would silently shadow the other and the machine model in force would depend on load order (#281).

What the compiler reports

E6012 … memory space 'HBM' is declared in more than one input

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 `--machine` file and the program both declaring `Memory HBM` is an error,
// not a silent shadow (#281). The declaration tables are name-keyed and module
// order is a HashMap iteration, so one would win arbitrarily -- and which SKU
// was actually in force could differ between runs, which is precisely the
// property the flag exists to make trustworthy.
//

// Conflicts with the machine file's `HBM`.
Memory HBM {
  capacity: 8 GiB
}

fn main() -> i32 {
  let kv : Tensor<f32, [1024, 1024]> = Tensor<f32, [1024, 1024]>::uninit();
  let _staged = transfer(kv, Memory::HBM);
  return 0;
}

From tests/frontend/fail/machine_flag_duplicate_decl.vx, which asserts this diagnostic on every commit.

Related