Summary:
The profiler currently maintains a counter locally and that counter is not synchronized with the checkpointed train step. This PR fixes the issue.
In some trainers, the profiling is designed to be done only once and the global step is used to prevent profiling from happening after checkpoint resume.
Summary: The profiler currently maintains a counter locally and that counter is not synchronized with the checkpointed train step. This PR fixes the issue.