-
Notifications
You must be signed in to change notification settings - Fork 25.6k
Improve compiler error messages of the op registration API #18550
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
Closed
Conversation
This file contains hidden or 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
Differential Revision: D14659178 Differential Version: 77149741
This was referenced Mar 28, 2019
Closed
Differential Revision: D14659178 Differential Version: 77154550
Differential Revision: D14659178 Differential Version: 77219770
Differential Revision: D14659178 Differential Version: 77235119
Differential Revision: D14659178 Differential Version: 77241462
Differential Revision: D14659178 Differential Version: 77272981
This was referenced Mar 28, 2019
Differential Revision: D14659178 Differential Version: 77290005
This was referenced Mar 29, 2019
Differential Revision: D14659178 Differential Version: 77301826
Differential Revision: D14659178 Differential Version: 77376797
Differential Revision: D14659178 Differential Version: 77381579
Differential Revision: D14659178 Differential Version: 77424603
Differential Revision: D14659178 Differential Version: 77453774
Differential Revision: D14659178 Differential Version: 77464747
Differential Revision: D14659178 Differential Version: 77672609
Differential Revision: D14659178 Differential Version: 77673996
Differential Revision: D14659178 Differential Version: 77725335
This pull request has been merged in 7a37e06. |
zdevito
pushed a commit
to zdevito/ATen
that referenced
this pull request
Apr 2, 2019
Summary: Pull Request resolved: pytorch/pytorch#18550 When the operator registration API is used wrongly, in most cases we should now get a nice compiler error instead of weird template error messages. This is done by making the enable_if conditions more broad so they also match error cases, but then having static_asserts against these error cases inside the function. Before that, since the function didn't match, the error message said something like "no function found to match your call", now it will show the error message specified in the static_asserts. Reviewed By: dzhulgakov Differential Revision: D14659178 fbshipit-source-id: 7ca4fb72d9051eadf0a7e2717b962bf1213a52b2
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.
Stack:
:white_circle: #18706 Enable gmock and fix system gtest issue 💛
:white_circle: #18547 Improve and test error messages for signature mismatches 💚
:black_circle: #18550 Improve compiler error messages of the op registration API 💚
:white_circle: #18551 Allow registering an operator schema without a kernel 💚
:white_circle: #18577 Register operators by passing arguments to RegisterOperators constructor 💚
:white_circle: #18592 [wip] Move ATen-core target one directory up 💛
:white_circle: #18593 [wip] Split function schema parser from operator 💛
:white_circle: #18594 [wip] Use function schema parser from op registration API 💛
:white_circle: #18597 [wip] Rewrite test cases with string based schema 💛
:white_circle: #18599 [wip] Use string based schema for exposing caffe2 ops 💛
:white_circle: #18600 [wip] Remove FunctionSchema based registration APIs 💛
When the operator registration API is used wrongly, in most cases we should now get a nice compiler error
instead of weird template error messages.
This is done by making the enable_if conditions more broad so they also match error cases,
but then having static_asserts against these error cases inside the function.
Before that, since the function didn't match, the error message said something like "no function found to match your call",
now it will show the error message specified in the static_asserts.
Differential Revision: D14659178