[PyTorch][mobile] Audit mobile interpreter for extra copies (#54031)

Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/54031

Similar to D27060762 (665d5e2a4f), caught some probably-unintended copies.
ghstack-source-id: 124040889

Test Plan: CI?

Reviewed By: walterddr, iseeyuan

Differential Revision: D27061818

fbshipit-source-id: f4a77cb5c21cd3ebce7b7e82764e4361467bab91
This commit is contained in:
Scott Wolchok 2021-03-17 08:40:15 -07:00 committed by Facebook GitHub Bot
parent ce15f312a8
commit 8f1af02f35

View File

@ -191,8 +191,8 @@ bool InterpreterState::run(Stack& stack) {
++pc;
} break;
case NAMED_TUPLE_CONSTRUCT: {
auto type = code_->types_[inst.X]->expect<at::TupleType>();
namedTupleConstruct(stack, type, inst.N);
namedTupleConstruct(
stack, code_->types_[inst.X]->expect<at::TupleType>(), inst.N);
++pc;
} break;
case CREATE_OBJECT: {