pytorch/torch/_dynamo/variables
Michael Lazos 342d78d1a2 Cache guards once per variable tracker, rather than re-propagating them repeatedly (#89827)
This improves tracing performance of optimizer tracing significantly (2x). In essence this just removes the recursion from propagate because it is not necessary. ListVariables and ConstDictVariables already contain the guards from the items contained in them.

Adds two other optimizations for special cases of `recursively_contains`

helps with https://github.com/pytorch/torchdynamo/issues/1803

Pull Request resolved: https://github.com/pytorch/pytorch/pull/89827
Approved by: https://github.com/anijain2305, https://github.com/jansel
2022-12-02 01:45:05 +00:00
..
__init__.py [dynamo] Port all pytorch/dynamo and test/dynamo pieces over from symbolic-shapes branch (#88768) 2022-11-13 04:50:21 +00:00
base.py Cache guards once per variable tracker, rather than re-propagating them repeatedly (#89827) 2022-12-02 01:45:05 +00:00
builder.py [FSDP][Dynamo] Define annotation attributes as globals (#89913) 2022-12-01 13:25:54 +00:00
builtin.py [Dynamo] Fix several bugs & code refactor in RangeVariable (#89322) 2022-11-23 19:44:48 +00:00
constant.py [dynamo] Port all pytorch/dynamo and test/dynamo pieces over from symbolic-shapes branch (#88768) 2022-11-13 04:50:21 +00:00
dicts.py Cache guards once per variable tracker, rather than re-propagating them repeatedly (#89827) 2022-12-02 01:45:05 +00:00
functions.py [Dynamo] Support typing.Mapping & Support function as argument (#88963) 2022-11-17 06:57:42 +00:00
lists.py Cache guards once per variable tracker, rather than re-propagating them repeatedly (#89827) 2022-12-02 01:45:05 +00:00
misc.py [dynamo] Don't copy the graph during checkpointing (copy_graphstate) (#89232) 2022-11-29 07:19:02 +00:00
nn_module.py [Dynamo] Fix source/reconstruction bugs in NNModule named_* calls (#89729) 2022-11-30 06:05:47 +00:00
tensor.py Remove fake_tensor_propagation (#89646) 2022-11-25 03:27:32 +00:00
torch.py Revert "Support set_rng_state with fake tensor (#89642)" 2022-11-28 19:13:33 +00:00
user_defined.py [EASY] Replace direct use of Guard ctor with make_guard (#89945) 2022-11-30 22:45:09 +00:00