seniorPyTorch
How does mixed precision (AMP) work at hardware level?
Updated May 17, 2026
Short answer
AMP uses FP16/BF16 compute on tensor cores with FP32 master weights for stability.
Deep explanation
Automatic Mixed Precision selectively casts operations to lower precision while keeping critical ops in FP32. GradScaler prevents underflow by scaling loss dynamically. GPUs use tensor cores for accelerated matrix multiplications.
Unlock with a Pro subscription to view this section.
View pricingReal-world example
No real-world example available yet.
Unlock with a Pro subscription to view this section.
Upgrade to ProCommon mistakes
No common mistakes listed yet.
Unlock with a Pro subscription to view this section.
Upgrade to ProFollow-up questions
No follow-up questions available yet.
Unlock with a Pro subscription to view this section.
Upgrade to Pro