Support for latest PyTorch profiler
See original GitHub issue🚀 Feature
Support for the “new” PyTorch profiler.
Motivation
Per the PyTorch docs, the torch.autograd profiler used in Lightning is legacy code and will be deprecated. The torch.profiler is much nicer and has been supported for over a year.
Pitch
Rename PyTorchProfiler to PyTorchAutogradProfiler and implement PyTorchProfiler as the new default profiler.
Alternatives
Keep PyTorchProfiler as the legacy profiler and implement PyTorchProfiler2 (or something) as an alternative profiler.
Additional context
N/A
Issue Analytics
- State:
- Created 2 years ago
- Comments:6 (3 by maintainers)
Top Results From Across the Web
torch.profiler — PyTorch 1.13 documentation
PyTorch Profiler is a tool that allows the collection of performance metrics during training and inference. Profiler's context manager API can be used...
Read more >Support for latest PyTorch profiler · Issue #12358 - GitHub
Per the PyTorch docs, the torch.autograd profiler used in Lightning is legacy code and will be deprecated. The torch.profiler is much nicer and ......
Read more >PROFILING AND OPTIMIZING PYTORCH APPLICATIONS ...
... Microsoft) shares the most recent updates to PyTorch Profiler, a demo and tips for leveraging the Profiler API to help you quickly ......
Read more >PyTorch Profiler and Designing Evolutionary Data Systems
This is a recording of a live meetup we ran on November 17th. PyTorch Proflier updates and a chat about Designing Evolutionary Data...
Read more >What is the new PyTorch profiler? - eduCBA
A PyTorch Profiler is an open-source tool for analyzing and troubleshooting large-scale deep learning models with accuracy and efficiency. This new tool, which ......
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

The integration with the latest pytorch profiler is already available here: https://github.com/PyTorchLightning/pytorch-lightning/blob/master/pytorch_lightning/profiler/pytorch.py
Specifically: https://github.com/PyTorchLightning/pytorch-lightning/blob/bc812077c41896c93205fe6e9e3d18485d83a2e5/pytorch_lightning/profiler/pytorch.py#L477-L479
@kaushikb11 the profiling docs should be updated to reflect this: https://pytorch-lightning.readthedocs.io/en/latest/advanced/profiler.html#pytorch-profiler
Sure!