-
Notifications
You must be signed in to change notification settings - Fork 7k
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 test for dispatcher kernel signature consistency #6904
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
If you like me are wondering why the video kernels are not showing up, although they have the same issue as the image kernels above: we simply forgot to "tell" our tests that the dispatchers now also handle videos. See #6905 for a fix. |
…er/vision into dispatcher-kernel-signature
datumbox
approved these changes
Nov 7, 2022
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!
facebook-github-bot
pushed a commit
that referenced
this pull request
Nov 14, 2022
Summary: * add test for dispatcher kernel signature consistency * add dispatcher feature signature consistency test * fix error message Reviewed By: NicolasHug Differential Revision: D41265185 fbshipit-source-id: 50274734d755875f7b3ffb858d82c13b53338a4d Co-authored-by: Vasilis Vryniotis <datumbox@users.noreply.github.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This test makes sure the dispatchers and the kernels have the "same" signature within the rules we defined for exceptions. Meaning,
The kernels are allowed to require extra metadata that is only passed explicitly to the dispatcher through the feature, e.g.
vision/torchvision/prototype/transforms/functional/_geometry.py
Line 51 in cb4413a
vision/torchvision/prototype/transforms/functional/_geometry.py
Lines 30 to 32 in cb4413a
The kernels are allowed to "drop" some parameters if they are nonsensical for the feature type in question, e.g.
vision/torchvision/prototype/transforms/functional/_geometry.py
Lines 203 to 209 in cb4413a
vision/torchvision/prototype/transforms/functional/_geometry.py
Line 164 in cb4413a
Currently there are two failures:
I don't know if they are deliberate or not.
cc @vfdev-5 @datumbox @bjuncek