-
Notifications
You must be signed in to change notification settings - Fork 88
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
Add support for MaxPool unit8 type #2973
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there a test that you want to enable or add ?
@umangyadav That is why I left it in draft state to check with you about this. Currently it fixes crashes for a number of models listed in https://github.com/gyulaz-htec/models/blob/migraphx_testing/MIGRAPHX_fp32-int8.md and also one python backend test that I will remove from disabled list. So this causes issues only on the gpu, is there any other test that you would prefer to have for this kind of fix? |
This build is OK for merge ✅ |
🔴bert_large_uncased_fp16: FAILED: MIGraphX is not within tolerance - check verbose output |
Well if there are any ONNX tests on backend that this breaks on or allows us to run, we should turn those on for coverage and use that to run in our CI if that fixes it. Secondly what models from that list does this fix? Do you have a comprehensive list? Add that to this ticket and we can determine if we need to add coverage for them here or make them part of another set of runs. |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## develop #2973 +/- ##
========================================
Coverage 91.77% 91.77%
========================================
Files 484 484
Lines 18711 18715 +4
========================================
+ Hits 17172 17176 +4
Misses 1539 1539 ☔ View full report in Codecov by Sentry. |
@TedThemistokleous I added a full list of models that don't break due to the unsupported error anymore, they compile and run successfully, but they do have accuracy issues as stated in the comment migraphx-benchmark#165. |
Accuracy could be related to uint8-int8 related conversion since you need to shift the data and zero points accordingly. See #2903 |
Having a onnx backend test is good. But in addition to that can you make a few of the verify tests with unit8 type. |
@umangyadav I added two verify tests for MaxPool as requested. Uint8 type or any integer type is not supported for AveragePool, as it can be seen https://onnx.ai/onnx/operators/onnx__AveragePool.html. |
ONNX doesn't seem to support that but inside MIGraphX we should be able to create avgpool with uint8 dtype. |
@umangyadav @TedThemistokleous Currently as I see test_avg_pooling_3d_opt passes for uint8_type, while test_avg_pooling_3d fails with The test that fails has padding that is not default. |
@nives-vukovic can you open an issue about the avgpool failure with padding ? I'll approve this PR for now. |
Agree with @umangyadav on this. Lets get this in. Adding support shouldnt be difficult |
@nives-vukovic there seems to be failure in the clang_asan run. Can you investigate |
Unfortunately, I don't have access to the outputs of these errors. Can those be provided? |
@TedThemistokleous @umangyadav It seems that clang_asan fails for test Did you encountered such issues before? I see that on cpu, there should be conversion of all types to float, so I am not sure why this is reported. I noticed that in previous PRs where you added support of uint8 type you didn't add verify tests, but only different onnx tests, so is this expected? |
I haven't seen that before. Likely this implies we're missing some sort of conversion? That looks like we're getting something smaller than numeric limits off lowest() for float. https://en.cppreference.com/w/cpp/types/numeric_limits
This isn't expected. We shouldn't be hitting this case. I'll have to dig more |
Did you happen to look into this issue or have an advice where to dig for the problem? |
Clang ASAN is complaining because, test is using Ceil mode. Last window of maxpool is operation on padded region completely which are initialized with |
Discussed potential solutions:
|
Resolves migraphx-benchmark#165