E6043
E6043 — A register budget (max_registers) on a target that is not an NVIDIA GPU (arch: nvptx64).
What the compiler reports
Error[E6043] at {{.*}}max_registers_on_cpu_target.vx:[[@LINE+1]]:3: Only an NVIDIA GPU target (`arch: nvptx64`) takes `max_registers`, but `Topology::CPU` has no `arch:`
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
//
// Only an NVIDIA GPU target (`arch: nvptx64`) takes `max_registers`. The
// compiler reports error E6043 when the target is a CPU.
//
fn main() -> i32 {
spawn on(Topology::CPU, max_registers: 96) {
let mut x: i32 = 0;
x = x + 1;
}
return 0;
}
From tests/frontend/fail/max_registers_on_cpu_target.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.
E6042Code on device 1 or a later device of a declared GPU (
arch: nvptx64 with count:). The CUDA runtime gets only device 0 of a declared GPU, and the memory of every device is on GPU 0, so the code has no GPU to run on yet. Run it on device 0.
E6044A register budget (max_registers) that is 0 or greater than 255.