mirror of
https://github.com/pytorch/pytorch.git
synced 2025-10-20 21:14:14 +08:00
[PyTorch] Adopt faster Tuple::create (#65381)
Summary: Pull Request resolved: https://github.com/pytorch/pytorch/pull/65381 The previous diff adds a way to make Tuples of size 3 or less more efficiently. This diff makes it easier to hit that path and updates a bunch of callsites to hit it. ghstack-source-id: 142065832 Test Plan: CI Reviewed By: ezyang Differential Revision: D31069538 fbshipit-source-id: d04da3709594ed68ab1c0a1471f8cffd8d001628
This commit is contained in:
committed by
Facebook GitHub Bot
parent
9e71ea292d
commit
7cd62621fb
@ -419,8 +419,8 @@ struct InterpreterStateImpl : c10::intrusive_ptr_target {
|
||||
if (num_outputs == 1) {
|
||||
future_->markCompleted(stack.back());
|
||||
} else {
|
||||
future_->markCompleted(c10::ivalue::Tuple::create(
|
||||
jit::last(stack, num_outputs).vec()));
|
||||
future_->markCompleted(
|
||||
c10::ivalue::Tuple::create(jit::last(stack, num_outputs)));
|
||||
}
|
||||
}
|
||||
// destroy the last frame and call RecordFunction's end callbacks
|
||||
|
Reference in New Issue
Block a user