← 返回事件
持续讨论AI发版

trunk/52d08b9519e82b71ababd98473077dff9007f875: [PyTorch][jit] Avoid IValue copies in unpickler (#193250) (#193250)

图:PyTorch Releases

发生了什么

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…

摘要按规则整理自下方来源原文

为什么在扩散

来源