Resolve tf32 against the GPU, and reject GPUs PyTorch cannot use
Hussein+1: Claude Opus 5 (1M context)
85d3028
Second GPU run got past LoRA injection and died building the trainer:
error: --tf32 requires Ampere or a newer GPU arch, cuda>=11 and torch>=1.7
The configs enable tf32 because it is free speed where it exists, but the guard
was `config.tf32 if torch.cuda.is_available() else False` -- which asks whether
there is a GPU, not whether that GPU has TF32. Anything below Ampere reaches
Transformers, which raises rather than ignoring the flag. Resolve it against the
device instead, the way the script already resolves precision, and say so when a
requested tf32 is dropped. Losing tf32 costs speed; failing the run costs the
whole run.
Preflight also let this through, and let through the larger problem behind it: a
Tesla P100 is sm_60, PyTorch 2.10 compiles for sm_70 and up, and such a GPU is
visible, reports its memory, and satisfies `is_available()` before failing at the
first kernel launch. Compare each device against `torch.cuda.get_arch_list()` and
refuse there -- preflight exists to …