I often struggle to find out which environment variable would enable certain debug traces. Often, I find myself looking into the source code to figure out the environment variable check hidden behind a conditional to enable the debug tracing.
I have seen certain useful environment variables mentioned in PyTorch blogs/docs (the troubleshooting guide, for example) or tutorials/talks. But they are not exhaustive.
For instance, I want to print the “cache hit” message from _custom_eval_frame:
Do you have any suggestions for this?
The above specific case is a compilation flag, which is enabled by uncommenting #define TORCHDYNAMO_DEBUG 1 in torch/csrc/dynamo/debug_macros.h