Skip to content

Conversation

smessmer
Copy link
Contributor

@smessmer smessmer commented Mar 28, 2019

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

Differential Revision: D14659178
Differential Version: 77149741
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
Differential Revision: D14659178
Differential Version: 77290005
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
smessmer added 2 commits April 1, 2019 15:27
Differential Revision: D14659178
Differential Version: 77673996
Differential Revision: D14659178
Differential Version: 77725335
@facebook-github-bot
Copy link
Contributor

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
@ezyang ezyang deleted the export-D14659178 branch May 30, 2019 15:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants