pytorch
93be0e20 - [SR] Avoid boxing inputs in DictConstruct/ListUnpack (#74250)

Commit
2 years ago
[SR] Avoid boxing inputs in DictConstruct/ListUnpack (#74250) Summary: Pull Request resolved: https://github.com/pytorch/pytorch/pull/74250 The `DictConstruct`/`ListUnpack` implementations currently put all of their inputs onto a stack before calling the JIT implementation in `vararg_functions.cpp`. This was done to avoid code duplication, but it's quite wasteful since it causes extra heap allocations and, potentially, refcount bumps. Given that these two ops are quite common and the code duplication is only a few lines, it seems reasonable to avoid this cost. ghstack-source-id: 151897634 Test Plan: Existing unit tests Reviewed By: navahgar Differential Revision: D34901245 fbshipit-source-id: ece0618a6134a35720f214e79c64f12045f074d0 (cherry picked from commit 1f8e223c1887ed205c84a7ac4587813f94b11bad)
Author
Mike Iovine
Committer
Parents
Loading