trunk/52d08b9519e82b71ababd98473077dff9007f875: [PyTorch][jit] Avoid IValue copies in unpickler (#193250) (#193250)
- PyTorch 近 90 天出现 10 次
- PyTorch 近 90 天第 10 次发版
- 上一次:同一天稍早 · trunk/dc3f3e4104ad548277fe50a4d9b0f652bda3f6ea
发生了什么
Summary: Avoid IValue copies in unpickler.cpp . Move keys/values into the dict in readInstruction 's DICT / SETITEMS / SETITEM arms. Those stack slots are dropped by stack_.erase() on the very next statement, and Dict::insert_or_assign is template (Key_&&, Value_&&) forwarding into Key(std::forward (key)) , so this genuinely moves -- 4 atomic refcount ops saved per dict entry on the state_dict path. Change const aut…
摘要按规则整理自下方来源原文