Add PyTorch profiler to support tracing of forward/backward calls (#1761)

* Add PyTorch profiler support

* Add support for wrapped code, fix linting errors

* Update docs
This commit is contained in:
Jonáš Kulhánek authored and GitHub committed 2023-04-18 20:29:09 +02:00
1 parent 37322ec453
commit ea14152ae6
5 files changed
+142 -18

No files matched your search

+5 -3
View File
@@ -119,9 +119,11 @@ class LoggingConfig(PrintableConfig):
e.g. if 20, averages will be computed over past 20 occurrences."""
local_writer: LocalWriterConfig = LocalWriterConfig(enable=True)
"""if provided, will print stats locally. if None, will disable printing"""
enable_profiler: bool = True
"""whether to enable profiling code; prints speed of functions at the end of a program.
profiler logs run times of functions and prints at end of training"""
profiler: Literal["none", "basic", "pytorch"] = "basic"
"""how to profile the code;
"basic" - prints speed of all decorated functions at the end of a program.
"pytorch" - same as basic, but it also traces few training steps.
"""
# Viewer related configs