Skip to content
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

[TOPI][Testing] Enable conv2d NHWC fp16 topi testing for arm_cpu #17007

Merged
merged 2 commits into from
May 22, 2024

Conversation

Anndrey24
Copy link
Contributor

This commit adds fp16 test cases to the conv2d NHWC TOPI schedules for arm_cpu.
Following the example of #8529, the numpy reference conv2d output is computed in fp32 instead of fp16, while the absolute tolerance varies for each test case according to the size of the summed axis and the output's largest element.

cc @ekalda @lhutton1

This commit adds fp16 test cases to the conv2d NHWC TOPI schedules for `arm_cpu`.
Following the example of apache#8529, the numpy reference conv2d output is computed in fp32 instead of fp16, while the absolute tolerance varies for each test case according to the size of the summed axis and the output's largest element.
@github-actions github-actions bot requested review from ekalda and lhutton1 May 17, 2024 13:03
Copy link
Contributor

@lhutton1 lhutton1 left a comment

Choose a reason for hiding this comment

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

LGTM!

Copy link
Contributor

@ekalda ekalda left a comment

Choose a reason for hiding this comment

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

Thanks @Anndrey24 for improving the test coverage! I was wondering if we should guard the running of fp16 mods based on the existence of fullfp16 extension on the target hardware?

tests/python/topi/test_topi_conv2d_nhwc.py Show resolved Hide resolved
Copy link
Contributor

@ekalda ekalda left a comment

Choose a reason for hiding this comment

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

Thanks @Anndrey24 LGTM!

@ekalda ekalda merged commit ac9a943 into apache:main May 22, 2024
19 checks passed
@ekalda
Copy link
Contributor

ekalda commented May 22, 2024

Thanks @Anndrey24 and @lhutton1!

@Anndrey24 Anndrey24 deleted the conv2d-fp16-testing branch May 22, 2024 10:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants