Remove redundant kernels calling TypeDefault in VariableType codegen. (#42031)
Summary:
We have code snippet like below in VariableType_X.cpp
```
Tensor __and___Scalar(const Tensor & self, Scalar other) {
auto result = TypeDefault::__and___Scalar(self, other);
return result;
}
TORCH_LIBRARY_IMPL(aten, Autograd, m) {
m.impl("__and__.Scalar",
c10::impl::hacky_wrapper_for_legacy_signatures(TORCH_FN(VariableType::__and___Scalar))
);
```
We already register TypeDefault kernels as catchAll so they're not needed to be wrapped and register to Autograd key in VariableType.cpp. This PR removes the wrapper and registration in VariableType.cpp. (The ones in other files like TracedType.cpp remains the same).
Here's a [diff in generated VariableTypeEverything.cpp](https://gist.github.com/ailzhang/18876edec4dad54e43a1db0c127c5707)
Pull Request resolved: https://github.com/pytorch/pytorch/pull/42031
Reviewed By: agolynski
Differential Revision: D22903507
Pulled By: ailzhang
fbshipit-source-id: 04e6672b6c79e079fc0dfd95c409ebca7f9d76fc