vllm-project/vllm · error · RuntimeError
CUDA is required for this proof.
Error message
CUDA is required for this proof.
What it means
This verification script measures exponential/Gumbel race precision and requires a real CUDA accelerator. The first guard fails when torch.accelerator.is_available() is false — torch sees no usable accelerator device in the current process.
Source
Thrown at tools/gumbel_precision/prove_exponential_race_precision.py:116
remaining -= batch
torch.accelerator.synchronize()
elapsed = time.perf_counter() - start
print(f"{dtype}: tail_hits={hits} elapsed={elapsed:.2f}s")
def main() -> None:
parser = argparse.ArgumentParser()
parser.add_argument("--lower-tail-samples", type=int, default=200_000_000)
parser.add_argument("--lower-tail-chunk-size", type=int, default=10_000_000)
parser.add_argument("--race-trials", type=int, default=100_000)
parser.add_argument("--race-tail-tokens", type=int, default=262_144)
parser.add_argument("--race-gap", type=float, default=20.5)
parser.add_argument("--race-chunk-trials", type=int, default=64)
parser.add_argument("--seed", type=int, default=2026)
args = parser.parse_args()
if not torch.accelerator.is_available():
raise RuntimeError("CUDA is required for this proof.")
device = torch.accelerator.current_accelerator()
if device.type != "cuda":
raise RuntimeError("CUDA is required for this proof.")
print(f"torch={torch.__version__} cuda={torch.version.cuda}")
print(f"device={device}")
measure_exponential_lower_tail(
device=device,
samples=args.lower_tail_samples,
chunk_size=args.lower_tail_chunk_size,
seed=args.seed,
)
run_many_tail_race(
device=device,
trials=args.race_trials,
num_tail_tokens=args.race_tail_tokens,
gap=args.race_gap,View on GitHub (pinned to c794754062)
Solutions
- Run the script on a machine with a working NVIDIA GPU and a CUDA-enabled torch build.
- If using Docker, start the container with `--gpus all` and a CUDA base image.
- Unset or correct CUDA_VISIBLE_DEVICES and verify `python -c "import torch; print(torch.accelerator.is_available())"` returns True first.
Defensive patterns
Strategy: validation
Validate before calling
import torch
if not torch.accelerator.is_available():
raise SystemExit("No accelerator visible; fix GPU passthrough/driver before running the proof") Prevention
- Gate GPU tools behind a torch.accelerator.is_available() check in wrapper scripts.
- In Docker, always launch with --gpus all.
- Verify CUDA_VISIBLE_DEVICES is not empty before running GPU-only proofs.
When it happens
Trigger: Running tools/gumbel_precision/prove_exponential_race_precision.py on a CPU-only host, in a container without GPU passthrough, or with CUDA_VISIBLE_DEVICES set to an empty/invalid value.
Common situations: Running the numerical proof on a dev box without a GPU; docker run without --gpus; CUDA driver mismatch making the device invisible to torch.
Related errors
- managed Python headless engine exited unexpectedly with stat
- Numerics check failed for case {case}:\n{e}
- Could not determine Python executable. Please provide it man
- Failed to find the NIXL wheel after building it.
- Failed to find the repaired NIXL wheel.
AI-assisted analysis of vllm-project/vllm@c794754062 (2026-08-14).
Data as JSON: /api/errors/12ee1bee51a76ef2.
Report an issue: GitHub.