pytorch
704af23e - Use a reference in GetSingleArgument (#71007)

Commit
2 years ago
Use a reference in GetSingleArgument (#71007) Summary: Pull Request resolved: https://github.com/pytorch/pytorch/pull/71007 A string copy at Line 417 is currently consuming 125,749,287,000 cycles/day. I suspect the issue is with a copy-on-return, but we can experiment with introducing a reference in the middle to see if that produces a good savings without changing the interface. Reference ``` ["Inline caffe2::ArgumentHelper::GetSingleArgument @ caffe2/caffe2/utils/proto_utils.cc:417"] ``` Test Plan: Sandcastle Reviewed By: xw285cornell Differential Revision: D33478883 fbshipit-source-id: e863e359c0c718fcd0d52fd4b3c7858067de0670
Author
Parents
Loading