Turn on the compute levers in order of payoff: BF16 autocast, fused attention through scaled_dot_product_attention , torch.compile , TF32 for whatever still runs in FP32, the fused AdamW step, then the largest micro-batch that fits, and CUDA graphs only if launch overhead is still visible. On Nodus, where an H100 SXM is listed at $2.60 per hour, a 1.51x speedup on a 192 GPU-hour run cuts the bill from $499.20 to $330.60. Measure each lever on your own model before trusting anyone's number, including the ones below.
This post covers the math side of the step. If your GPU sits idle waiting on data or on .item() calls, fix that first with the low GPU utilization guide ; none of the levers here help a starved GPU. Spreading the work across more GPUs is a separate decision, covered in how to train PyTorch on multiple GPUs .
Which PyTorch speedups pay off most?
The ones that move matrix math onto Tensor Cores and cut memory traffic.…