-
Notifications
You must be signed in to change notification settings - Fork 5.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Zero-Dim] Make auto parallel judge dim more strict #47961
[Zero-Dim] Make auto parallel judge dim more strict #47961
Conversation
你的PR提交成功,感谢你对开源项目的贡献! |
✅ This PR's description meets the template requirements! |
753e871
to
15fc86a
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
@@ -1540,7 +1540,7 @@ def _get_op_by_id(ops, id): | |||
input_var | |||
).dims_mapping | |||
else: | |||
if fwd_op_dist_attr.get_input_dims_mapping(input_name): | |||
if input_name in forward_op.input_arg_names: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
L1242 have same condition with here, need to be modified together?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
已一起修改
15fc86a
to
bd77569
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
PR types
Others
PR changes
OPs
Describe
修复模型报错。
使自动并行获取dim时的判断更严格,由于原本采用
if ref_dims_mapping
的方式,但当 dim=[](表示0D Tensor的shape)时,[]在python语法里会被当成False,与None等同。因此使这里的判断更严格,区分[]与None的不同。
[]的shape在网络中打印出来如下(注:[]是Tensor.shape的一种正确形式,与None不同):