E6014

E6014 — A program stages through host memory while a machine model is in force, and no host was declared. --machine describes 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 default names 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