megengine.amp.low_prec_dtype

low_prec_dtype = <property object>

Get or set amp autocast mode’s lower precision dtype. It will change the target dtype in tensor casting for better speed and memory. Default: float16.

实际案例

import megengine as mge
mge.amp.low_prec_dtype = "float16"