pytorch
d4f5f9fd - Profile dynamo guards (#96119)

Commit
2 years ago
Profile dynamo guards (#96119) Adds a profiler start and end callback to dynamo's C eval_frame impl, which can be used to profile a region providing a name for visualization. Currently only hooks up one usage to profile cache lookup (primarily covering guards and linear search through linked list). Example profile taken from toy model: `python benchmarks/dynamo/distributed.py --toy_model --profile --dynamo aot_eager` <img width="1342" alt="image" src="https://user-images.githubusercontent.com/4984825/223225931-b2f6c5a7-505a-4c90-9a03-34982f6dc033.png"> Planning to measure overhead in CI, and probably can't afford to check this in enabled by default. Will have to evaluate UX options such as `config.profile_dynamo_cache = True` or some other way. Pull Request resolved: https://github.com/pytorch/pytorch/pull/96119 Approved by: https://github.com/jansel
Author
Committer
Parents
Loading