Skip to content

fix(cli): say when a ! program builds for the CPU because no CUDA toolkit was found - #1888

Merged
Lorenzobattistela merged 1 commit into
mainfrom
fix/gpu-fallback-notice
Oct 27, 2026
Merged

Lorenzobattistela merged 1 commit into
mainfrom
fix/gpu-fallback-notice

Conversation

@Lorenzobattistela

Copy link
Copy Markdown
Collaborator

Fixes #1863

On Linux, a program with ! and no CUDA toolkit (no include/nvrtc.h under $CUDA_HOME, $CUDA_PATH, /usr/local/cuda or /opt/cuda) built with exit 0 for the CPU lane, and nothing said so. cli_build now prints one line to stderr and builds as before:

bend: no CUDA toolkit (include/nvrtc.h under $CUDA_HOME, $CUDA_PATH, /usr/local/cuda or /opt/cuda), so ! runs on the CPU

The change is a notice only, so existing CPU-only builds keep working. macOS always builds the Metal lane and never prints it.

Checks

  • Linux (docker, arm64, clang 19, no CUDA): a ! program prints the line, builds with exit 0 and runs (1024); the same program without ! prints nothing.
  • macOS: the ! program builds with no notice.
  • bun gates/repo.ts: PASS 54/54.
  • Not tested: Linux with a toolkit present (by reading cli_build, bangs is then true and the notice is skipped).

🤖 Generated with Claude Code

…lkit was found (#1863)

On Linux, a program with ! and no include/nvrtc.h under $CUDA_HOME,
$CUDA_PATH, /usr/local/cuda or /opt/cuda built silently for the CPU lane.
cli_build now prints one line to stderr and builds as before.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@Lorenzobattistela
Lorenzobattistela merged commit eef6fcb into main Oct 27, 2026
1 check passed
@Lorenzobattistela
Lorenzobattistela deleted the fix/gpu-fallback-notice branch October 27, 2026 16:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant