Improve and test error messages for signature mismatches (#18547)
authorSebastian Messmer <messmer@fb.com>
Tue, 2 Apr 2019 19:23:13 +0000 (12:23 -0700)
committerFacebook Github Bot <facebook-github-bot@users.noreply.github.com>
Tue, 2 Apr 2019 19:33:24 +0000 (12:33 -0700)
commitae1d13a06fc43688fcf79c8f04c437b8ac6b3f61
tree09a924ff87b890c571e13f294afe74255cc2b946
parentbb8a0d717ccb6e39e2ac1b8634e9277f22bd0327
Improve and test error messages for signature mismatches (#18547)

Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/18547

- Argument indices in the error messages are 1-indexed not 0-indexed.
- Add test cases that a mismatching signature actually shows the correct error messages

Reviewed By: dzhulgakov

Differential Revision: D14656695

fbshipit-source-id: 55e45634baa3117e18b8687ea6b2a2f83715bdf6
aten/src/ATen/core/op_registration/infer_schema.cpp
aten/src/ATen/core/op_registration/kernel_function_legacy_test.cpp
aten/src/ATen/core/op_registration/kernel_function_test.cpp
aten/src/ATen/core/op_registration/kernel_functor_test.cpp
aten/src/ATen/core/op_registration/kernel_lambda_legacy_test.cpp
aten/src/ATen/core/op_registration/kernel_lambda_test.cpp
aten/src/ATen/core/op_registration/op_registration_test.cpp
aten/src/ATen/core/op_registration/test_helpers.h