-
Notifications
You must be signed in to change notification settings - Fork 3.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Schedule in PyTorchProfiler doesn't work #14063
Comments
If we set the After then, we will call And we can see, that we will ignore
But, in fact,
|
This issue has been automatically marked as stale because it hasn't had any recent activity. This issue will be closed in 7 days if no further activity occurs. Thank you for your contributions - the Lightning Team! |
This is still an issue. |
This is still an issue, and it makes profiling with the pytorch profiler almost impossible, as the behavior is very different from expected and limited in usefulness. |
I would also be quite interested in that topic. |
🐛 Bug
The class
pytorch_lightning.profiler.PyTorchProfiler
doesn't work correctly withschedule
parameter. It doesn't take into account therepeat
parametertorch.profiler.schedule
, which is very important in long-term learning.To Reproduce
Reproduce with the BoringModel:
UPD: new link with example of main incorrect work and work with commit changes:
https://colab.research.google.com/drive/1UbbLx5N5Th0MsXu1olQwWqo7QLGd-lRY?usp=sharing
Expected behavior
I used
pytorch_lightning.profiler.PyTorchProfiler
withschedule=torch.profiler.schedule(wait=2, warmup=1, active=3, repeat=5,)
. And according to torch docs, i expect that there will be 5 cycles, each of which consists of 2 wait + 1 warmup + 3 active = 6 steps (per cycle), but in factPyTorchProfiler
records information about fewer cycles.In code terms:
in this case the profiler should return information about 15 steps (3 active * 5 cylcles) to me, however it returns information about fewer steps because it doesn't record some cycles.
Environment
Additional context
I found the same issue #12611 .
cc @carmocca @kaushikb11 @ninginthecloud @rohitgr7 @nbcsm @guotuofeng
The text was updated successfully, but these errors were encountered: