-
Notifications
You must be signed in to change notification settings - Fork 522
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
[MLIR][ONNX] Add OnnxToTorch support for GlobalMaxPool Op #3232
[MLIR][ONNX] Add OnnxToTorch support for GlobalMaxPool Op #3232
Conversation
73c3ab1
to
9b006a7
Compare
Hello! Welcome! Nice PR & much appreciated! Left some comments for code quality. I hope you find them helpful. |
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.
Hi @NeverRaR, I see many things done wrongly in this lowering. Please correct them.
- First of all, you should not be lowering this op to AdaptiveMaxPooling, instead use "AtenMaxPooldOp".
- Your lowering returns 2 results while the original Onnx op expects 1 result.
- The logic for the computation of output shape is also wrong, we can't just assume any dynamic dim to be 1.
|
If that's the case, you could have added a lowering for AtenMaxPool1dOp.
No, that's not true. You can't replace an op with one result with an op with different number of results. See the crash in the CI for the same.
If that's the case then there's no need to put the check, just assign value 1. |
Okay, I think I understand now. All modifications have been completed.I will added a lowering for AtenMaxPool1dOp in next pr. |
@vivekkhandelwal1 Does the failure of CI seem unrelated to my code? |
Yes |
15596c0
to
5f85ed4
Compare
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.
LGTM
@NeverRaR, you need approval from other reviewers as well to merge this. |
nod-ai/SHARK-ModelDev#658 --------- Co-authored-by: root <[email protected]>
nod-ai/SHARK-ModelDev#658