pytorch
364645cd - [SR] Factor operator() implementation into separate function (#67125)

Commit
3 years ago
[SR] Factor operator() implementation into separate function (#67125) Summary: Pull Request resolved: https://github.com/pytorch/pytorch/pull/67125 Using explicit template instantiations in D31659973 (https://github.com/pytorch/pytorch/commit/f2582a59d0835323ebf143726ea79ba52e7cceff) was a bad idea. The problem is that the lvalue instantiation was for a `const` vector of `IValue`, meaning that if you tried to pass SR a non-const vector of arguments, the linker would fail to find the symbol. The reason we didn't catch this in D31659973 (https://github.com/pytorch/pytorch/commit/f2582a59d0835323ebf143726ea79ba52e7cceff) was because predictor always passes a `const` reference anyways. But we should fix this to prevent unexpected problems in the future. Test Plan: `buck test caffe2/benchmarks/static_runtime/...` Reviewed By: hlu1 Differential Revision: D31873406 fbshipit-source-id: 5ab5a03334bed925cec11facadcedf9bec9b90ad
Author
Mike Iovine
Parents
Loading