-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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
[Relay, TOPI] Refactor Adaptive pool and add 3d support #5049
Conversation
@kevinthesun Can you take a look at this? This is for extending adaptive pool op you added in #3085 |
@masahi I'll take a look during the weekend. |
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.
Looks great! Left one comment but otherwise I can't find anything that needs to be changed.
2af665c
to
90c2219
Compare
@kevinthesun Thanks, the diff is not small, but it is due to Relay boilerplate that were mostly copy-pasted from 2d version. The only interesting bits is cpp topi refactoring. I also finished adding 3d model support in our torch frontend, buidling on this PR. We can now load and run resnet 3D from torchvision. I believe this is the first time TVM runs on 3D workload end to end. The diff between this PR is here masahi/tvm@adaptive-pool-3d...masahi:torch-3d |
@jwfromm You can easily add adaptive pool 1d, if there is such use case. |
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
Thanks @kevinthesun @jwfromm |
* add stub for nd impl * refactored indices compute * refactored divide step * remove unused variables, add doc * fix lint * add relay op def * add python registration * refactor topi test * update relay tests, but test result is weird * workaround for weird bug * add relay adaptive pool 3d test * add topi tests * update doc for 3d * typo fix * fix lint * add more tests including NDHWC
* add stub for nd impl * refactored indices compute * refactored divide step * remove unused variables, add doc * fix lint * add relay op def * add python registration * refactor topi test * update relay tests, but test result is weird * workaround for weird bug * add relay adaptive pool 3d test * add topi tests * update doc for 3d * typo fix * fix lint * add more tests including NDHWC
I'm trying to load resnet 3D from torchvision using torch frontend, and for that I need adaptive avg pool 3d. I refactored the existing topi 2d impl to work with N dimensional input, and added Relay boilerplate for the new 3d version.
please review @kevinthesun @icemelon9 @anijain2305 @jwfromm