Skip to content

[arm_ut_py] fix reduce_max compute error and add reduce_* ut_py#8649

Merged
chenjiaoAngel merged 11 commits intoPaddlePaddle:developfrom
chenjiaoAngel:reduce_max_fix
Mar 22, 2022
Merged

[arm_ut_py] fix reduce_max compute error and add reduce_* ut_py#8649
chenjiaoAngel merged 11 commits intoPaddlePaddle:developfrom
chenjiaoAngel:reduce_max_fix

Conversation

@chenjiaoAngel
Copy link
Collaborator

No description provided.

@paddle-bot-old
Copy link

Thanks for your contribution!

@chenjiaoAngel chenjiaoAngel changed the title [arm] fix reduce_max compute error [arm_ut_py] fix reduce_max compute error and add reduce_* ut_py Mar 16, 2022
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]]))
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

axis_list 也可以是 0,1,2 等情况吧?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

有呀, [0], [1], [2]
axis 这个传进去的必须是list,不能是单独的数值。这个可以看paddle/paddle-lite OP 定义

Copy link
Collaborator

@zhaoyang-star zhaoyang-star Mar 22, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[0,1,2]这种情况

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:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这种情况下OpenCL是支持的,之前的单测中已经覆盖到这种情况了。

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

嗯,但是这个case下,部分输入计算有diff,需要你们看看

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

好的,这个问题等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]]))
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

同上,也可以是三个数

Copy link
Collaborator

@zhaoyang-star zhaoyang-star left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@chenjiaoAngel chenjiaoAngel merged commit 2c5feaa into PaddlePaddle:develop Mar 22, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants