E6014
E6014 — A program stages through host memory while a machine model is in force, and no host was declared.--machinedescribes an accelerator and says nothing about the machine it hangs off, so the host end of that seam was being reasoned about without anything describing it.--host <file>names one;--host defaultnames the machine compiling the program. A host declares no capacity — host memory is virtual, and a hard limit would reject programs that page rather than fail — so this is about the host being *stated* rather than assumed, not about a budget.
What the compiler reports
E6014 … stages through host memory
pass --host
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
//
// Staging through host memory against a machine model requires a host (#341).
//
// `--machine` describes an accelerator. It says nothing about the machine that
// accelerator hangs off, and `Memory::CPU_DRAM` otherwise arrives from the
// built-ins carrying no declaration at all -- so the host end of this seam was
// being reasoned about, and costed, against something nobody described. No host
// is assumed for any program.
//
// A host declares no capacity, deliberately: host memory is virtual, and a
// tensor larger than physical RAM pages rather than failing. A hard limit would
// reject programs that run. What a host file states is that it exists and how
// fast it is, not how much of it there is.
//
// The rule is scoped to fleet-level compilation. Without `--machine` this is an
// ordinary native build and needs no host, and a kernel whose tensors are
// already device-resident reasons about no host whether or not a machine model
// is in force -- both of those are checked in
// tests/optimizations/pass/host_flag_scope.vx, since a test here has to fail.
//
fn main() -> i32 {
let mut weights = Tensor<f32, [64, 64]>::uninit();
let weights_d = transfer(weights, Memory::HBM);
return 0;
}
From tests/frontend/fail/host_not_declared.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.
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.
E6015A structurally invalid transfer lowering (impl transfer A -> B { ... }): the same edge implemented twice in one compilation (which one is in force would be load order), or a lowering with no functions (an empty body cannot move anything, and accepting it would make impl transfer an inert annotation rather than code).