E6012
E6012 — The sameMemoryorTopologyname is declared by two compilation inputs (e.g. a--machinefile 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
Topologies and memoryThe chapter covering the rule this code enforces.
All diagnosticsEvery code the compiler can emit, grouped by stage.
E6011A sub-space's
scope is broader than its parent's (locality must narrow down within:).
E6013A declared transfer edge carries an explicit cost *and* has one derivable from its endpoints' bandwidth: figures. An edge gets exactly one cost source, because two answers to "what does this hop cost" is not a model: the compiler routed by the declared number and reported the derived one, and nothing detected the disagreement.