megengine.amp.high_prec_dtype

high_prec_dtype = <property object>

Get or set amp autocast mode’s higher precision dtype. It will change the target dtype in tensor casting for better precision. Default: float32.

实际案例

import megengine as mge
mge.amp.high_prec_dtype = "float32"