• F
    Layer norm fp16 (#29169) · 7584bb50
    furnace 提交于
    * add fp16 for layer_norm op
    
    * revert layernorm api
    
    * fix forward
    
    * fix forward
    
    * fix backward for layernorm with fp16
    
    * fix unit test for layernorm with fp16
    
    * fix with_mkldnn compile error for layernorm with fp16
    
    * 1. revert to PADDLE_ENFORCE_NOT_NULL, 2. change static_cast<float> to static_cast<U>
    
    * fix with_mkldnn compile error for layernorm with fp16
    
    * fix with_mkldnn compile error for layernorm with fp16
    Co-authored-by: Nzhiqiu <chenqiuliang@baidu.com>
    7584bb50
fp16_utils.py 12.5 KB