mirror of
https://github.com/pytorch/pytorch.git
synced 2025-10-20 21:14:14 +08:00
[dynamo] allow global import from collections import deque
in user code (#148676)
See https://github.com/pytorch/pytorch/pull/148669#discussion_r1983462218 for more details. Pull Request resolved: https://github.com/pytorch/pytorch/pull/148676 Approved by: https://github.com/jansel
This commit is contained in:
committed by
PyTorch MergeBot
parent
59f14d19ae
commit
098494e9cb
@ -563,7 +563,6 @@ class DequeVariable(CommonListMethodsVariable):
|
||||
)
|
||||
|
||||
def reconstruct(self, codegen: "PyCodegen") -> None:
|
||||
assert "deque" not in codegen.tx.f_globals
|
||||
codegen.add_push_null(
|
||||
lambda: codegen.append_output(
|
||||
codegen.create_load_python_module(collections.deque)
|
||||
|
Reference in New Issue
Block a user