benchmark
c06c4896 - Remove DICT_SUBCLASS_GUARD_MANAGER and use dict.keys (#143722)

Commit
353 days ago
Remove DICT_SUBCLASS_GUARD_MANAGER and use dict.keys (#143722) Summary: In hinsight, we never needed a DICT_SUBCLASS_GUARD_MANAGER, because Dynamo would inline through the overridden keys method. In this PR, we ensure that while creating guards and constructing variable trackers, we get the `d.keys()` value by using `dict.keys(d)`. This ensures that we do not call overridden keys method. Therefore, the C++ guard can use `PyDict_Next` directly to check the guards. X-link: https://github.com/pytorch/pytorch/pull/143722 Approved by: https://github.com/jansel Reviewed By: jeanschmidt Differential Revision: D67666061 Pulled By: anijain2305 fbshipit-source-id: b40c775d53370ee79fcc642f122b2ae8219c710e
Author
Parents
Loading