GPU smoke test

swaleio/[email protected]

GPU smoke test

The mandatory first-run canary for a GPU compute type. It proves the whole GPU path in seconds — the NVIDIA driver is mounted (nvidia-smi), torch sees the device (torch.cuda.is_available()), and a real CUDA kernel runs (a 1024×1024 matmul) — then emits the GPU's name, VRAM, and CUDA version as typed outputs. Run it as the first task the first time you point a workflow at a new GPU compute type, before committing hours of training time to it.

Inputs

None — the task takes no parameters.

Outputs

Output Description
gpu_name The CUDA device name reported by torch (e.g. NVIDIA A100-SXM4-80GB).
vram_gb Total GPU memory in GiB, one decimal place.
cuda_version The CUDA version the torch build targets (e.g. 13.0).

Compute

GPU required. Any VRAM size passes (it allocates only a few MB); the workflow selects the compute type via compute_type. On a CPU compute type the task fails — nvidia-smi is absent and torch.cuda.is_available() is False — and that is by design: a mis-typed compute selection surfaces here in seconds instead of deep inside a training job.

Example

The task declares no inputs, so it takes no args:

name: GPU smoke test example
compute_type: a100-1   # the GPU compute type to verify
entry_point: main

blocks:
  main:
    tasks:
      gpu_check:
        name: GPU check
        uses: swaleio/gpu-smoke-test

Downstream tasks read the probed hardware via ${{tasks.gpu_check.outputs.gpu_name}}, ${{tasks.gpu_check.outputs.vram_gb}}, and ${{tasks.gpu_check.outputs.cuda_version}}.


For the workflow syntax these examples use, see the workflow definition reference in the Swale documentation.

Licensed under the MIT License.