S-exp GPU
All pages
Docs · The command lineMarkdown

doctor

sexpgpu doctor checks whether a run, or an evaluation from checkpoints, can start on this machine: one line per check on standard output, exit 0 when the checks pass. Run it first on a new machine. It reads the same environment a run would.

$ sexpgpu doctor
sexpgpu      0.1.0 /usr/local/bin/sexpgpu
...
gpu          none (nvidia-smi is not on PATH or found no device)
compiler     stable
env          no SEXPGPU_* variable is set; the defaults are cpu and no metrics
metrics key  O41_METRICS_API_KEY not set; SEXPGPU_METRICS=o41 would refuse
s3           no AWS_* or SEXPGPU_*_AWS_* variable is set; an s3:// loader or checkpoint would refuse
disk         72Gi free in the working directory
choices      measured by each run; a resume takes its checkpoint's
run          ok: a run or an evaluation can start here

Keys are reported as set or not, never by value. Other lines appear when they apply:

lineshows
floorafter gpu: whether the driver and compute capability meet the CUDA requirements. Informational: it never makes doctor exit 1, but a run refuses a card below the floor when it opens the device, so read it before trusting run ok
devicesthe CUDA ordinals a run would use (the CUDA build)
one per CUDA libraryafter devices: the version the library reports and whether a run needs it, or none and what a run does without it
rocmthe ROCm build: the AMD GPU it opens, the first of SEXPGPU_DEVICES or ordinal 0, with its name, ordinal and architecture (gfx942 on an MI300X), or unavailable and why. The Linux x86-64 CUDA build: the sexpgpu-rocm beside it that SEXPGPU_DEVICE=rocm runs, or none and the install command. The other binaries: that rocm needs the Linux x86-64 ROCm build
metalmacOS binary: the Apple GPU name, or why it cannot open the GPU
nodeswhere a run over several nodes puts this process
checkpointswith SEXPGPU_CHECKPOINT_DIR set: the newest complete checkpoint there, what evaluate --checkpoint latest and run --resume latest would read

On a workstation with the driver and cuDNN but no CUDA toolkit:

cublas       none: the loader finds no libcublas.so.13; required, SEXPGPU_DEVICE=cuda would refuse
cublaslt     none: the loader finds no libcublasLt.so.13; required, SEXPGPU_DEVICE=cuda would refuse
nvrtc        none: the loader finds no libnvrtc.so.13; required, SEXPGPU_DEVICE=cuda would refuse
cudnn        9.25.1, optional
nccl         none: the loader finds no libnccl.so.2; a run on one GPU needs none, one over several GPUs or nodes would refuse
run          ok: a run or an evaluation can start here; SEXPGPU_DEVICE=cuda would refuse: a CUDA run needs cuBLAS (libcublas.so.13), ...

An installed library reads cublas 13.1.1, required. A cuDNN other than the 9.13.0 native attention takes reads cudnn 8.9.0, optional: the loader opens cuDNN 8.9.0 (libcudnn.so first), where native attention needs 9.13.0, so its regions run the ordinary lowering. With SEXPGPU_DEVICE=cuda a missing required library is a refusal; with another device the run line adds what a CUDA run would refuse for.

The ROCm build answers sexpgpu doctor on a machine with an AMD GPU and no NVIDIA one, and wherever SEXPGPU_DEVICE=rocm is set. Its cuda build line says it is the ROCm build, its rocm line names the GPU, and it has no CUDA library lines; a missing HIP runtime, HIPRTC or rocBLAS is named on the rocm line, or with SEXPGPU_DEVICE=rocm on the run line as a failure. With SEXPGPU_DEVICE=rocm and no sexpgpu-rocm beside sexpgpu, doctor exits 2 with the install command, as every command does.

The choices line says how a run would make its choices: pinned, none measured, or measured by each run.

When it exits 1

When any of these holds, each of which would stop a run before its first step:

  • an unreadable SEXPGPU_* configuration;
  • SEXPGPU_DEVICE=cuda in a binary without CUDA, or with no GPU;
  • SEXPGPU_DEVICE=cuda where the loader finds no cuBLAS, cuBLASLt or NVRTC, or no NCCL for several GPUs or nodes;
  • SEXPGPU_DEVICE=rocm where the ROCm build cannot open the GPU or load the HIP runtime, HIPRTC or rocBLAS;
  • SEXPGPU_DEVICE=metal without a Metal-enabled macOS binary or an Apple GPU;
  • an SEXPGPU_DEVICES that does not parse or names an ordinal that is not visible, E-DP-001;
  • a node topology that does not parse, E-DP-005;
  • an s3:// checkpoint location without a full set of credentials;
  • a local SEXPGPU_RESUME that is not a directory;
  • an SEXPGPU_CHECKPOINT_DIR that cannot be listed, which evaluate and run --resume latest would read;
  • an SEXPGPU_CHOICES that names no recorded choices, E-CHOICE-002.

CUDA startup failures in rrun

Inside an rrun job, doctor exits 75 when its only refusal is CUDA device initialization failed. rrun retries the job on another machine. Outside rrun, the same refusal exits 1. A missing CUDA library, no exposed device, an invalid device selection or any additional refusal keeps the exit status at 1.

Related: devices, install.