Make CompileEventLogger more defensive w.r.t to AOTAutogradCache and FXGraphCache (#150423)
Summary:
This PR makes it so that we don't crash due to logging if we invoke AOTAutogradCache/FXGraphCache without using dynamo. This is preparation for supporting certain VLLM use cases where they store graph modules and have special handling in conjunection with the caches.
X-link: https://github.com/pytorch/pytorch/pull/150423
Approved by: https://github.com/oulgen
Reviewed By: atalman
Differential Revision: D72453905
fbshipit-source-id: 77da32a50b8020e03e97d3098b9c6b7d2546f13f