E6010
E6010 — The working set placed in a memory space (the sum of its tiles) exceedscapacity. Downgraded to W1028 when the space is declaredovercommit.
What the compiler reports
E6010 … (2 tiles) sums to 134217728 bytes
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 reshape view adds nothing to the working set, but a second tensor placed in the same space
// still does: two 64 MiB tiles do not fit in 100 MiB.
//
Memory CPU_DRAM {}
Memory GPU_HBM {
within: Memory::CPU_DRAM, capacity: 100 MiB, bandwidth: 300 GB/s, managed: cached, scope: device
}
fn fill<const R : i32, const C : i32>(t : &mut Tensor<f32, [R, C], Memory::GPU_HBM>) -> void {
spawn on(Topology::GPU) {
for r in 0..R {
for c in 0..C {
t[r][c] = 1.0;
}
}
}
return;
}
fn main() -> i32 {
let h = Tensor<f32, [4096, 4096]>::new();
let mut t = transfer(h, Memory::GPU_HBM);
let mut v = t.reshape([16384, 1024]);
let g = Tensor<f32, [4096, 4096]>::new();
let mut u = transfer(g, Memory::GPU_HBM);
fill<16384, 1024>(&mut v);
fill<4096, 4096>(&mut u);
return 0;
}
From tests/frontend/fail/second_tile_next_to_a_reshape_view.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.
E6009A statically-shaped tensor placed in a memory space exceeds that space's
capacity.
E6011A sub-space's scope is broader than its parent's (locality must narrow down within:).