pytorch
1ba94b38 - Support pickle version 4 by adding missing ops (#90223)

Commit
2 years ago
Support pickle version 4 by adding missing ops (#90223) Summary: In this logic, we are traversing the entries to find the module for STACK_GLOBAL entries. According to https://github.com/python/cpython/blob/2837241f22be33a5597707b2aa723cb2cf6f3967/Lib/pickletools.py#L1799 we need to look for GET, BINGET and LONG_BINGET. So this diff updates that. Also while testing, I found some cases of empty modules, for cases such as tanh. For this I added the option to skip processing when this is the case. Test Plan: Tested with f392778829 Differential Revision: D41748595 Pull Request resolved: https://github.com/pytorch/pytorch/pull/90223 Approved by: https://github.com/PaliC
Author
Committer
Parents
Loading