Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Enhancements to recompiles logs (#130043)
Summary: ---- - We now record on CacheEntry what the compile id that populated it was, so now we can say why a specific frame was rejected - Add structured log for recompiles under name artifact "recompile_reasons". As it stands, it's not terribly structured, but this was the easiest thing I could do to start - Slightly reformat multi-reason printing; since we only report one guard failure seems better to have it as a single line Example output: ``` V0703 10:34:13.273000 140345997743104 torch/_dynamo/guards.py:2590] [0/1] [__recompiles] Recompiling function f in /data/users/ezyang/a/pytorch/b.py:3 V0703 10:34:13.273000 140345997743104 torch/_dynamo/guards.py:2590] [0/1] [__recompiles] triggered by the following guard failure(s): V0703 10:34:13.273000 140345997743104 torch/_dynamo/guards.py:2590] [0/1] [__recompiles] - 0/0: tensor 'L['x']' size mismatch at index 0. expected 4, actual 5 ``` Signed-off-by: Edward Z. Yang <[email protected]> X-link: pytorch/pytorch#130043 Approved by: https://github.com/anijain2305 Reviewed By: izaitsevfb Differential Revision: D59554320 Pulled By: ezyang fbshipit-source-id: fac47afc2c903d8d25144e95c41a30c492019a1e
- Loading branch information