Skip to content

Commit a424eae

Browse files
【Auto Parallel】Add has_bias check in fused_linear_param_grad_add (#72483)
1 parent c305e9b commit a424eae

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

paddle/phi/api/generator/dist_api_gen.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1912,6 +1912,11 @@ def generate_output_dist_attr_setting(self) -> str:
19121912
)
19131913
)
19141914
else:
1915+
if (
1916+
self.kernel['func'][0] == 'fused_linear_param_grad_add'
1917+
and i == 1
1918+
):
1919+
set_out_dist_attr_code += "\n if (has_bias)"
19151920
set_out_dist_attr_code += (
19161921
SET_SINGLE_OUT_REPLICATED_DIST_ATTR_TEMPLATE.format(
19171922
out_name

0 commit comments

Comments
 (0)