Remove reference_cast in make_boxed_from_unboxed_functor (#1300)
Summary: Pull Request resolved: https://github.com/pytorch/pytorch/pull/51319 We were going out of our way to accommodate `IValue::to<Tensor>` returning a copy of the inner Tensor. `IValue::toTensor` is capable of returning a reference without copying, so if we use it directly, we can allow kernels that want to take `Tensor &` to do so! As a bonus, we get reduced build times. ghstack-source-id: 121378961 Reviewed By: bhosmer Differential Revision: D26138549 fbshipit-source-id: b0f830527da360c542c815bef2f7e1692615b32a Co-authored-by:Scott Wolchok <swolchok@fb.com>
Showing
Please register or sign in to comment