E6011
E6011 — A sub-space'sscopeis broader than its parent's (locality must narrow downwithin:).
What the compiler reports
E6011
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
//
// Locality must narrow (never widen) going down the memory hierarchy: a sub-space cannot be
// scoped more broadly than the space that contains it. A `device`-scoped space declared
// `within` an `sm`-scoped one is incoherent (E6011). The faithful B200 shape is the reverse --
// per-SM SMEM/TMEM inside the per-device HBM.
//
Memory OneSm {
scope: sm
}
Memory Wider {
within: Memory::OneSm, scope: device
}
fn main() -> i32 {
return 0;
}
From tests/frontend/fail/memory_scope_widens.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.
E6010The working set placed in a memory space (the sum of its tiles) exceeds
capacity. Downgraded to W1028 when the space is declared overcommit.
E6012The 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).