未验证 提交 3a442a6a 编写于 作者: T Tony Cao 提交者: GitHub

[CodeStyle][F402] Change the loop variable name which is the same with an imported module (#46698)

* Update README.md

* Update README.md

* Fix F402 by changing the name of loop variable

* Change variable name
Change variable name 'temp_tensor' to 'var' to avoid confusion, as var
also appears in the same file.
上级 10b2d14e
...@@ -234,9 +234,8 @@ def distributed_attr_check_for_dist_op(serial_main_prog, dist_main_prog, ...@@ -234,9 +234,8 @@ def distributed_attr_check_for_dist_op(serial_main_prog, dist_main_prog,
def distributed_attr_check_for_program(dist_main_prog, dist_context): def distributed_attr_check_for_program(dist_main_prog, dist_context):
have_dist_attr = True have_dist_attr = True
for block in dist_main_prog.blocks: for block in dist_main_prog.blocks:
for tensor in block.vars.values(): for var in block.vars.values():
var_dist_attr = dist_context.get_tensor_dist_attr_for_program( var_dist_attr = dist_context.get_tensor_dist_attr_for_program(var)
tensor)
if var_dist_attr is None: if var_dist_attr is None:
have_dist_attr = False have_dist_attr = False
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册