-
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] Support paddle.sum/mean/loss api output 0D, test=allcase #52739
Conversation
你的PR提交成功,感谢你对开源项目的贡献! |
096e89f
to
036b36f
Compare
8f04011
to
d6bd7f9
Compare
1ba1235
to
09b477d
Compare
7cd9db2
to
c394876
Compare
c394876
to
f6d53f4
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
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
@@ -511,7 +511,7 @@ def _prepare_logger( | |||
loss_indices = fetch_indices[group_idx] | |||
assert len(loss_indices) <= 1 | |||
for idx in loss_indices: | |||
logs["loss"] = outs[idx][0] | |||
logs["loss"] = outs[idx] |
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.
What's the reason to remove the [0]
?
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.
outs是executor的fetch出来的loss结果,原来的fetch出来的是1D,所以这里取了下标0来切片;新的loss为0D:[],所以就不能取下标切片了,直接当成float来用就行。
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
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
#53601) * [Zero-Dim] fix functool.reduce more safe with intial value, to support empty list (#53182) * [Zero-Dim] support 0d tensor for shape and squeeze onednn kernel (#52832) * support 0d tensor for shape and squeeze onednn kernel * set python api for shape op ut * [Zero-Dim] distributed scatter/all_to_all support input 0D tensor (#53186) * [Zero-Dim] Support paddle.sum/mean/loss api output 0D,test=allcase (#52739) * [CINN Support 0D-Tensor] CINN supports 0D-Tensor with trick temporarily (#53382) * [CINN Support 0D-Tensor] CINN supports 0D-Tensor with trick temporarily * Add unittest * [CINN Support 0D-Tensor] CINN hack squeeze2 with trick temporarily (#53454) * fix test_autograd_dynamic (#53473) Co-authored-by: zhwesky2010 <[email protected]> --------- Co-authored-by: YangQun <[email protected]> Co-authored-by: HongyuJia <[email protected]> Co-authored-by: HydrogenSulfate <[email protected]>
PR types
New features
PR changes
APIs
Description
Pcard-66984
支持以下API输出0D: