VariableKernel calls into scattered C++ api (#44158)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/44158
Previously, the C++ API only supported calling ops with a gathered TensorOptions object. So even if the VariableKernel took scattered arguments,
it had to re-gather them to call into the C++ API. But a diff stacked below this one introduced a scattered API for the C++ frontend.
This reaps the benefits and makes sure that if the Variable kernel gets scattered arguments (i.e. it's a c10-full op), then it passes those on without regathering
ghstack-source-id: 113355690
Test Plan:
vs master: https://www.internalfb.com/intern/fblearner/details/216342597/
vs prev diff: https://www.internalfb.com/intern/fblearner/details/216342688/
Reviewed By: ezyang
Differential Revision: D23512538
fbshipit-source-id: 8ee6c1cc99443a2141db85072fd6dbc52b4d77fd