Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Store CompilationEvents in a buffer in torch._dynamo.utils (#115788)
Summary: Motivation: it would be nice to be able to test using the metrics in log_compilation_event; currently dumps logs (or logs to a database in fbcode) - these are hard to use in unit tests. This change: * always record the information in torch._dynamo.utils.record_compilation_metrics; here, log into a limited-size deque to prevent the list of metrics from getting too long * if config.log_compilation_metrics, then call back into the original log_compilation_event function X-link: pytorch/pytorch#115788 Approved by: https://github.com/yanboliang Reviewed By: jeanschmidt Differential Revision: D52298053 Pulled By: davidberard98 fbshipit-source-id: ef291255d6148c0479f3000b4fb21a4ed72cadcb
- Loading branch information