-
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
AutoTVM: selecting tuning templates when extracting task #4338
Conversation
Make the procedure of trying new templates easier. Test: tests/python/relay/test_autotvm_task_extraction.py
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.
Thanks for the PR. This new optional argument indicates the template key when creating tasks, but what happens if I have more than one kinds of ops (e.g., dense, conv2d) in a model with different template keys? Specifically, in the following model:
conv2d
conv2d
dense
If I put template_key='winograd'
, then the semantic to dense is incorrect. On the other hand, I may only want to the first conv2d to use Winograd but keep the second one direct.
Thank you for the review @comaniac @tmoreau89 @vinx13 , really good points to have a dict holding the op to key mapping! I will update correspondingly. |
Comments addressed, please have a look into this when you are available :) @comaniac @tmoreau89 @vinx13 For the template key dict part, now have a TOPI op to template key mapping. Relay ops may have many topi ops which are implemented with different template keys, so maybe not good enough to be the dict keys. For the complicate case @comaniac mentioned in #4338 (review) , I guess it could be the user to handle as it is hard to generalize and the API (if there were such) could be annoying. |
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.
I agree with you that the case uses different template keys for one kind of ops could be too complicate to be handled here so let's put it away first.
Thank you for the quick look @comaniac ! Now updated. |
Thanks. LGTM. |
Thank you @comaniac ! I will update the tutorials in another PR. @tmoreau89 @vinx13 Would you like to have a look please :) |
Thanks @jackwish @comaniac @tmoreau89 this is merged |
* AutoTVM: selecting tuning templates when extracting task Make the procedure of trying new templates easier. Test: tests/python/relay/test_autotvm_task_extraction.py * Use dict to match key for topi ops * fix lint issue * be more pythonic :)
* AutoTVM: selecting tuning templates when extracting task Make the procedure of trying new templates easier. Test: tests/python/relay/test_autotvm_task_extraction.py * Use dict to match key for topi ops * fix lint issue * be more pythonic :)
Make the procedure of trying new templates easier.
Would you please have a look at this @eqy @merrymercy @tmoreau89 @vinx13