Skip to content

Commit

Permalink
fix profiler (#2818)
Browse files Browse the repository at this point in the history
  • Loading branch information
mvpatel2000 authored Jan 4, 2024
1 parent e5240d2 commit 2deccf2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion composer/profiler/torch_profiler.py
Original file line number Diff line number Diff line change
Expand Up @@ -342,7 +342,7 @@ def batch_start(self, state: State, logger: Logger) -> None:

def close(self, state: State, logger: Logger) -> None:
del state, logger # unused
if self.profiler is not None:
if self.profiler is not None and self.profiler.profiler is not None:
log.info(self.profiler.key_averages().table(sort_by='cpu_time_total', row_limit=20))
if self.profile_memory:
log.info(self.profiler.key_averages().table(sort_by='self_cpu_memory_usage', row_limit=20))
Expand Down

0 comments on commit 2deccf2

Please sign in to comment.