One-line PyTorch tweak: set_float32_matmul_precision('high') actually pays off

code_star · x · 2026-09-05

A developer reports that PyTorch's often-ignored warning to set torch.setfloat32matmulprecision('high') is genuinely worth following.

The setting lets float32 matmuls use faster lower-precision paths (like TF32 on Ampere+ NVIDIA GPUs), delivering noticeable speedups for training and inference with negligible accuracy loss in most cases. Many users dismiss the message; the author found it does improve real-world performance.

Original post →

More from Infra

Infra channel →