We added TORCH_LOGS="help"

If you run TORCH_LOGS=“help”, it now provides you some more info about how it’s used, as well as a curated list of some of the more useful artifacts. In particular, some that we’ve found particularly useful are

  • TORCH_LOGS=“guards”: Prints the guards for every compiled Dynamo frame.
  • TORCH_LOGS=“output_code”: Prints the code that Inductor generates.
  • TORCH_LOGS=“graph_breaks”: Tells you whenever Dynamo has any graph-breaks and why.
  • TORCH_LOGS=“aot_graphs”: Prints the captured FX graphs.
  • TORCH_LOGS=“recompiles”: Prints the reason that we recompiled a graph.

There is also TORCH_LOGS=“+help” for a more exhaustive view of all options.

5 Likes