-
Notifications
You must be signed in to change notification settings - Fork 523
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
TorchToTosa: ConvertAtenAvgPool2dOp is too restrictive. #3862
Comments
Thanks for reporting this, @dbabokin; I appreciate it. I will take a look and make the change. |
Thanks for reporting this. I was just chatting with @justin-ngo-arm about the topic and we agree - anything that results in a regression of previously working tests would need to be re-investigated. At least the legalization should enable default support of prior working tests, or if the tests were previously insufficient, offer patches. Without this regression we should be able to achieve over 1000 passing TorchToTosa fx_importer_tosa e2e tests, which is a nice milestone in itself . |
Hi @Hanumanth04, @sjarus and I also encounter the same problem. We were discussing looking at the e2e tests themselves and changing the parameters, but the problem might be more complicated than that since this also involves decomposing complex ops and PyTorch By the way, the list of tests that got affected by this change is documented under the comment @Hanumanth04, if you find a change for |
@sjarus, @justin-ngo-arm is there any plan to run the |
@justin-ngo-arm, Sure, I can apply the fix for |
Yes we'd like to make fx_importer_tosa the default . It's currently pending on some dependencies from @mgehre-amd's flows. It would be preferable to run fx_importer_tosa rather than the tosa target (TorchScript import). |
…nt_include_pad (#3868) Essentially, as part of my earlier [change](7f9f99c) , I didn't consider the `padding` value while erroring out for unsupported `count_include_pad` during `torch-to-tosa` lowering for AvgPool2d. The fix captured in this change addresses this. Please see [issue](#3862) for more details on this. Co-authored-by: Hanumanth Hanumantharayappa <hhanuman@ah-hhanuman-l.dhcp.mathworks.com>
PyTorch AvgPool2d has
count_include_pad
parameter, while TOSA'sAvgPool2d
doesn't have such parameter.With recent fix 7f9f99c by @Hanumanth04 the lowering of
AvgPool2d
was disabled, ifcount_include_pad
isTrue
to avoid silent wrong answer. The problem is that the fix doesn't take into account thepadding
value. If thepadding
is zero, then the valuecount_include_pad
doesn't matter.Why is this important? Because PyTorch
AvgPool2d
by default havepadding=0
andconut_include_pad=True
:I.e. this breaks the default case.
The text was updated successfully, but these errors were encountered: