pytorch
dd9f4c8c - [PyTorch] Reduce move overhead in inferExpandGeometry (#56032)

Commit
3 years ago
[PyTorch] Reduce move overhead in inferExpandGeometry (#56032) Summary: Pull Request resolved: https://github.com/pytorch/pytorch/pull/56032 Profiling & assembly inspection showed that we weren't getting NRVO with `inferExpandGeometry_dimvector` returning `std::tuple`. I added a custom type with constructors so that, as the comment says, we could be sure to get NRVO. ghstack-source-id: 127409717 Test Plan: Inspected new assembly, no more move construction (which is a copy for on-stack DimVectors!) upon returning Reviewed By: ezyang Differential Revision: D27768312 fbshipit-source-id: d1d53a36508be92585802e1467d8a42d1ae05d80
Author
Parents
Loading