From 51ed2788cd825be086e792d64929b8f6eb8bf797 Mon Sep 17 00:00:00 2001 From: Weilong Wu Date: Wed, 3 Aug 2022 15:22:39 +0800 Subject: [PATCH] [Eager] fix expand_grad, fill zero for empty grads (#44838) --- .../auto_code_generator/final_state_generator/codegen_utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/paddle/fluid/eager/auto_code_generator/final_state_generator/codegen_utils.py b/paddle/fluid/eager/auto_code_generator/final_state_generator/codegen_utils.py index 7dbc93a3581..c45f751b8c3 100644 --- a/paddle/fluid/eager/auto_code_generator/final_state_generator/codegen_utils.py +++ b/paddle/fluid/eager/auto_code_generator/final_state_generator/codegen_utils.py @@ -32,7 +32,7 @@ ops_to_fill_zero_for_empty_grads = set([ "square_double_grad", "celu_double_grad", "pad_double_grad", "pad3d_double_grad", "squeeze_double_grad", "unsqueeze_double_grad", "instance_norm_double_grad", "conv3d_double_grad", - "depthwise_conv2d_grad_grad", "concat_double_grad" + "depthwise_conv2d_grad_grad", "concat_double_grad", "expand_grad" ]) # For API dispatch used at python-level -- GitLab