E6026

E6026 — A tensor whose element type the target hardware cannot represent, placed on it anyway. The machine model states what a device has (dtypes: [f32, f16, ...]); this is the check that a placement stays inside it. An H100 has no fp4, so an fp4 tensor placed on one asks for silicon that is not there — and the placement is in the type, so the question is answerable here rather than at a kernel launch on the machine that lacks the type. Only fires against a topology that declares dtypes:. An undeclared machine constrains nothing, which is what keeps every machine file written before the field kept working.

What the compiler reports

Error[E6026] at {{.*}}:[[@LINE+1]]:14: this expression has element type f32, which NPU[0] cannot represent; it declares [f16, i32, u32, bool]

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
//

Topology NPU {
  memory: Memory::NPU_HBM,
  dtypes: [f16, i32, u32, bool]
}

fn main() -> i32 {
  spawn on(Topology::NPU[0]) {
    let _a = Tensor<f32>([4, 4]);
  }
  return 0;
}

From tests/frontend/fail/an_f32_tensor_on_an_npu_that_takes_only_f16_is_refused.vx, which asserts this diagnostic on every commit.

Related