[arm_ut_py] fix reduce_max compute error and add reduce_* ut_py#8649
Merged
chenjiaoAngel merged 11 commits intoPaddlePaddle:developfrom Mar 22, 2022
Merged
[arm_ut_py] fix reduce_max compute error and add reduce_* ut_py#8649chenjiaoAngel merged 11 commits intoPaddlePaddle:developfrom
chenjiaoAngel merged 11 commits intoPaddlePaddle:developfrom
Conversation
|
Thanks for your contribution! |
| axis_int = draw(st.integers(min_value=-1, max_value=3)) | ||
| axis_list = draw( | ||
| st.sampled_from([[2, 3], [1, 2], [0, 1], [1, 2, 3], [0, 1, 2]])) | ||
| st.sampled_from([[0], [1], [2], [3], [0, 1], [1, 2], [2, 3]])) |
Collaborator
There was a problem hiding this comment.
axis_list 也可以是 0,1,2 等情况吧?
Collaborator
Author
There was a problem hiding this comment.
有呀, [0], [1], [2]
axis 这个传进去的必须是list,不能是单独的数值。这个可以看paddle/paddle-lite OP 定义
| in_shape = list(program_config.inputs["input_data"].shape) | ||
| axis = program_config.ops[0].attrs["dim"] | ||
| if target_type == TargetType.OpenCL: | ||
| if len(axis) == 1 and len(in_shape) == 4: |
Collaborator
There was a problem hiding this comment.
这种情况下OpenCL是支持的,之前的单测中已经覆盖到这种情况了。
Collaborator
Author
There was a problem hiding this comment.
嗯,但是这个case下,部分输入计算有diff,需要你们看看
Collaborator
There was a problem hiding this comment.
好的,这个问题等PR合入后我本地复现下
| axis_list = draw(st.sampled_from([[0], [1], [2]])) | ||
| elif len(in_shape) == 4: | ||
| axis_list = draw( | ||
| st.sampled_from([[0], [1], [2], [3], [0, 1], [1, 2], [2, 3]])) |
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.
No description provided.