File tree Expand file tree Collapse file tree 1 file changed +18
-2
lines changed Expand file tree Collapse file tree 1 file changed +18
-2
lines changed Original file line number Diff line number Diff line change @@ -88,8 +88,24 @@ def fn(x, y):
88
88
except Exception as e :
89
89
print (f"Error during { name } : { str (e )} " )
90
90
91
- if __name__ == "__main__" :
92
- run_debugging_suite ()
91
+
92
+ run_debugging_suite ()
93
+
94
+ ######################################################################
95
+ # Use TORCH_TRACE/tlparse to produce produce compilation reports
96
+ # ~~~~~~~~~~
97
+ #
98
+ # In this section, we introduce the usage of TORCH_TRACE and tlparse to produce reports.
99
+ # First, we run `TORCH_TRACE="/tmp/tracedir" python script.py` to generate the raw trace logs.
100
+ # We have replace `/tmp/tracedir` with a path to a directory you want to store the trace logs
101
+ # and reaplce script with the name of your script.
102
+ #
103
+ # Next, we are going to pass the trace log to `tlparse` to generate compilation reports. We run
104
+ # `pip install tlparse` and then `tlparse /tmp/tracedir`. This will open up your browser with
105
+ # HTML like generated above.
106
+ #
107
+ # By default, reports generated by `tlparse` are
108
+ # stored in the directory `tl_out`. You can change that by doing `tlparse /tmp/tracedir -o output_dir/`.
93
109
94
110
######################################################################
95
111
# Conclusion
You can’t perform that action at this time.
0 commit comments