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

[Hexagon] Fix correctness error in conv2d hvx #13165

Merged
merged 1 commit into from
Oct 26, 2022

Conversation

quic-sanirudh
Copy link
Contributor

The output vector was not initialized to zero and that was causing incorrect output on target intermittently, but was always working on simulator. This patch fixes the error and enables the test case again

@tvm-bot
Copy link
Collaborator

tvm-bot commented Oct 21, 2022

Thanks for contributing to TVM! Please refer to the contributing guidelines https://tvm.apache.org/docs/contribute/ for useful information and tips. Please request code reviews from Reviewers by @-ing them in a comment.

Generated by tvm-bot

@janetsc
Copy link
Collaborator

janetsc commented Oct 21, 2022

I'm still seeing some failures with this change on our HDK. What is your hardware setup?

For example:

TestConv2dIntrin.test_conv2d[offset0x0-nhwc1x14x6x3-hwio3x3x3x64-stride1x1]
...
E AssertionError:
E Not equal to tolerance rtol=0.05, atol=0.05
E
E Mismatched elements: 1536 / 3072 (50%)
E Max absolute difference: 282.5
E Max relative difference: 57.4
E x: array([[[[ 5.51 , 5.754, 5.863, ..., 22.42 , 26.55 , 22.17 ],
E [ 5.88 , 7.195, 6.836, ..., 19.3 , 25.8 , 19.23 ],
E [ 6.1 , 6.68 , 6.62 , ..., 37.3 , 49.7 , 36.72 ],...
E y: array([[[[5.52 , 5.746, 5.86 , ..., 6.41 , 6.758, 5.918],
E [5.867, 7.19 , 6.832, ..., 5.484, 7.34 , 4.094],
E [6.098, 6.67 , 6.62 , ..., 5.605, 7.156, 4.508],...

@quic-sanirudh
Copy link
Contributor Author

quic-sanirudh commented Oct 21, 2022

I'm still seeing some failures with this change on our HDK. What is your hardware setup?

For example:

TestConv2dIntrin.test_conv2d[offset0x0-nhwc1x14x6x3-hwio3x3x3x64-stride1x1] ... E AssertionError: E Not equal to tolerance rtol=0.05, atol=0.05 E E Mismatched elements: 1536 / 3072 (50%) E Max absolute difference: 282.5 E Max relative difference: 57.4 E x: array([[[[ 5.51 , 5.754, 5.863, ..., 22.42 , 26.55 , 22.17 ], E [ 5.88 , 7.195, 6.836, ..., 19.3 , 25.8 , 19.23 ], E [ 6.1 , 6.68 , 6.62 , ..., 37.3 , 49.7 , 36.72 ],... E y: array([[[[5.52 , 5.746, 5.86 , ..., 6.41 , 6.758, 5.918], E [5.867, 7.19 , 6.832, ..., 5.484, 7.34 , 4.094], E [6.098, 6.67 , 6.62 , ..., 5.605, 7.156, 4.508],...

Oh that's surprising. I ran it multiple times on lahaina (v68) devices and never got any errors. I'll try to run it on other devices and see if I can reproduce this error.

The output vector was not initialized to zero and that was causing
incorrect output on target intermittently, but was always working on
simulator. This patch fixes the error and enables the test case again
@quic-sanirudh
Copy link
Contributor Author

Hi @janetsc, could you please share your device details, as I'm unable to reproduce the issue on my devices. I'm testing on v68 (lahaina) devices, and the tests are always passing for me on these devices, so need a little bit of help in reproducing the error you're seeing.

@janetsc
Copy link
Collaborator

janetsc commented Oct 26, 2022

I re-ran on a v69 device, and it is now passing. Sorry for the confusion previously - it is possible something didn't get updated on the device when I tried before. I will sign off. Thanks!

Copy link
Collaborator

@janetsc janetsc left a comment

Choose a reason for hiding this comment

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

Tested and verified - looks good

@driazati driazati merged commit 9dd0a70 into apache:main Oct 26, 2022
@quic-sanirudh
Copy link
Contributor Author

Tested and verified - looks good

Thanks for the review

xinetzone pushed a commit to daobook/tvm that referenced this pull request Nov 10, 2022
The output vector was not initialized to zero and that was causing
incorrect output on target intermittently, but was always working on
simulator. This patch fixes the error and enables the test case again
xinetzone pushed a commit to daobook/tvm that referenced this pull request Nov 25, 2022
The output vector was not initialized to zero and that was causing
incorrect output on target intermittently, but was always working on
simulator. This patch fixes the error and enables the test case again
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.

4 participants