trunk/52d08b9519e82b71ababd98473077dff9007f875: [PyTorch][jit] Avoid IValue copies in unpickler (#193250) (#193250)
- PyTorch: 2087 events in the last 90 days
- PyTorch: 2058th Release in the last 90 days
- Previous: earlier the same day · trunk/dc3f3e4104ad548277fe50a4d9b0f652bda3f6ea
What happened
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…
Summary assembled by rule from the sources below