fix some bugs for 0d output and fix some typoes#10282
Merged
mjp9527 merged 13 commits intoPaddlePaddle:developfrom Jun 8, 2023
Merged
fix some bugs for 0d output and fix some typoes#10282mjp9527 merged 13 commits intoPaddlePaddle:developfrom
mjp9527 merged 13 commits intoPaddlePaddle:developfrom
Conversation
|
Thanks for your contribution! |
mjp9527
reviewed
May 23, 2023
lite/operators/norm_op.cc
Outdated
| const bool asvector = param_.asvector; | ||
| if (asvector) { | ||
| reduce_dims.emplace_back(1); | ||
| // reduce_dims.emplace_back(1); |
mjp9527
reviewed
May 23, 2023
lite/operators/reduce_ops.cc
Outdated
| << "dims[i] is " << dims[i] << ", x_rank is " << x_rank; | ||
| } | ||
| return true; | ||
| // CHECK_GT(dims.size(), 0) |
mjp9527
reviewed
May 23, 2023
| @@ -82,7 +82,7 @@ def add_ignore_pass_case(self): | |||
| pass | |||
Collaborator
There was a problem hiding this comment.
没加0Dtensor判断,cambricon_mlu这个target也会跑
mjp9527
reviewed
May 23, 2023
lite/operators/reduce_ops.cc
Outdated
| for (int i = 0; i < dims.size(); i++) { | ||
| CHECK(dims[i] <= x_rank && dims[i] + x_rank >= 0) | ||
| << "dims[i] is " << dims[i] << ", x_rank is " << x_rank; | ||
| // CHECK(dims[i] <= x_rank && dims[i] + x_rank >= 0) |
mjp9527
reviewed
May 23, 2023
| reduce_all_data = True if len( | ||
| in_shape) == 0 or axis_list == None or axis_list == [] else False | ||
| if len(in_shape) == 0: | ||
| axis_list = draw(st.sampled_from([[-1], []])) |
Collaborator
There was a problem hiding this comment.
这个单测也没加0D tensor target 判断
mjp9527
reviewed
May 23, 2023
| reduce_all_data = True if len( | ||
| in_shape) == 0 or axis_list == None or axis_list == [] else False | ||
| if len(in_shape) == 0: | ||
| axis_list = draw(st.sampled_from([[-1], []])) |
Collaborator
There was a problem hiding this comment.
这个单测也没加0D tensor target 判断
mjp9527
reviewed
May 23, 2023
| reduce_all_data = True if len( | ||
| in_shape) == 0 or axis_list == None or axis_list == [] else False | ||
|
|
||
| if len(in_shape) == 0: |
Collaborator
There was a problem hiding this comment.
这个单测也没加0D tensor target 判断
4e34c30 to
b1e0220
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
PR devices
others
PR types
Bug fixes
PR changes
OP
Description
fix some bugs for 0d output and fix some typoes