🌐
Lightning AI
lightning.ai › docs › pytorch › 1.6.3 › advanced › profiler.html
Profiling — PyTorch Lightning 1.6.3 documentation
Profiling your training/testing/inference run can help you identify bottlenecks in your code. The reports can be generated with trainer.fit(), trainer.test(), trainer.validate() and trainer.predict() for their respective actions. PyTorch Lightning supports profiling standard actions in the training loop out of the box, including:
🌐
PyTorch Lightning
pytorch-lightning.readthedocs.io › en › 1.5.10 › advanced › profiler.html
Performance and Bottleneck Profiler — PyTorch Lightning 1.5.10 documentation
Profiling your training run can help you understand if there are any bottlenecks in your code. PyTorch Lightning supports profiling standard actions in the training loop out of the box, including:
🌐
Lightning AI
lightning.ai › docs › pytorch › stable › api › lightning.pytorch.profilers.PyTorchProfiler.html
PyTorchProfiler — PyTorch Lightning 2.6.1 documentation
This profiler uses PyTorch’s Autograd Profiler and lets you inspect the cost of different operators inside your model - both on the CPU and GPU.
🌐
PyTorch Lightning
pytorch-lightning.readthedocs.io › en › 1.6.5 › advanced › profiler.html
Profiling — PyTorch Lightning 1.6.5 documentation
This profiler will record training_step, backward, validation_step, test_step, and predict_step by default. The output below shows the profiling for the action training_step. The user can provide PyTorchProfiler(record_functions={...}) to extend the scope of profiled functions.
🌐
Lightning AI
lightning.ai › docs › pytorch › stable › tuning › profiler_basic.html
Find bottlenecks in your code (basic) — PyTorch Lightning 2.6.1 documentation
Profiler Report Profile stats for: get_train_batch 4869394 function calls (4863767 primitive calls) in 18.893 seconds Ordered by: cumulative time List reduced from 76 to 10 due to restriction <10> ncalls tottime percall cumtime percall filename:lineno(function) 3752/1876 0.011 0.000 18.887 0.010 {built-in method builtins.next} 1876 0.008 0.000 18.877 0.010 dataloader.py:344(__next__) 1876 0.074 0.000 18.869 0.010 dataloader.py:383(_next_data) 1875 0.012 0.000 18.721 0.010 fetch.py:42(fetch) 1875 0.084 0.000 18.290 0.010 fetch.py:44(<listcomp>) 60000 1.759 0.000 18.206 0.000 mnist.py:80(__getitem__) 60000 0.267 0.000 13.022 0.000 transforms.py:68(__call__) 60000 0.182 0.000 7.020 0.000 transforms.py:93(__call__) 60000 1.651 0.000 6.839 0.000 functional.py:42(to_tensor) 60000 0.260 0.000 5.734 0.000 transforms.py:167(__call__)
🌐
PyTorch Lightning
pytorch-lightning.readthedocs.io › en › 1.2.10 › advanced › profiler.html
Performance and Bottleneck Profiler — PyTorch Lightning 1.2.10 documentation
This profiler will record only for training_step_and_backward, evaluation_step and test_step functions by default. The output below shows the profiling for the action training_step_and_backward. The user can provide PyTorchProfiler(profiled_functions=[...]) to extend the scope of profiled functions.
🌐
PyTorch Lightning
pytorch-lightning.readthedocs.io › en › 0.9.0 › api › pytorch_lightning.profiler.html
pytorch_lightning.profiler package — PyTorch-Lightning 0.9.0 documentation
Simply pass in the name of your action that you want to track and the profiler will record performance for code executed within this context. from pytorch_lightning.profiler import Profiler, PassThroughProfiler class MyModel(LightningModule): def __init__(self, profiler=None): self.profiler = profiler or PassThroughProfiler() def custom_processing_step(self, data): with profiler.profile('my_custom_action'): # custom processing step return data profiler = Profiler() model = MyModel(profiler) trainer = Trainer(profiler=profiler, max_epochs=1)
🌐
Lightning AI
lightning.ai › docs › pytorch › 1.6.5 › advanced › profiler.html
Profiling — PyTorch Lightning 1.6.5 documentation
Profiling your training/testing/inference run can help you identify bottlenecks in your code. The reports can be generated with trainer.fit(), trainer.test(), trainer.validate() and trainer.predict() for their respective actions. PyTorch Lightning supports profiling standard actions in the training loop out of the box, including:
Find elsewhere
🌐
Medium
medium.com › pytorch › pytorch-lightning-1-3-lightning-cli-pytorch-profiler-improved-early-stopping-6e0ffd8deb29
PyTorch Lightning 1.3- Lightning CLI, PyTorch Profiler, Improved Early Stopping | by PyTorch Lightning team | PyTorch | Medium
May 7, 2021 - Lightning 1.3, contains highly anticipated new features including a new Lightning CLI, improved TPU support, integrations such as PyTorch profiler, new early stopping strategies, predict and validate trainer routines, and more.
🌐
PyTorch Lightning
pytorch-lightning.readthedocs.io › en › 1.6.4 › advanced › profiler.html
Profiling — PyTorch Lightning 1.6.3 documentation
This profiler will record training_step, backward, validation_step, test_step, and predict_step by default. The output below shows the profiling for the action training_step. The user can provide PyTorchProfiler(record_functions={...}) to extend the scope of profiled functions.
🌐
PyTorch Lightning
pytorch-lightning.readthedocs.io › en › 0.7.6 › profiler.html
Performance and Bottleneck Profiler — PyTorch-Lightning 0.7.6 documentation
Simply pass in the name of your action that you want to track and the profiler will record performance for code executed within this context. from pytorch_lightning.profiler import Profiler, PassThroughProfiler class MyModel(LightningModule): def __init__(self, hparams, profiler=None): self.hparams = hparams self.profiler = profiler or PassThroughProfiler() def custom_processing_step(self, data): with profiler.profile('my_custom_action'): # custom processing step return data profiler = Profiler() model = MyModel(hparams, profiler) trainer = Trainer(profiler=profiler, max_epochs=1)
🌐
PyTorch Lightning
pytorch-lightning.readthedocs.io › en › 1.6.2 › advanced › profiler.html
Profiler - PyTorch Lightning 2.1.1 documentation
This profiler will record training_step, backward, validation_step, test_step, and predict_step by default. The output below shows the profiling for the action training_step. The user can provide PyTorchProfiler(record_functions={...}) to extend the scope of profiled functions.
🌐
Lightning AI
lightning.ai › docs › pytorch › 1.6.0 › advanced › profiler.html
Profiling — PyTorch Lightning 1.6.0 documentation
Profiling your training/testing/inference run can help you identify bottlenecks in your code. The reports can be generated with trainer.fit(), trainer.test(), trainer.validate() and trainer.predict() for their respective actions. PyTorch Lightning supports profiling standard actions in the training loop out of the box, including:
🌐
GitHub
github.com › Lightning-AI › pytorch-lightning › blob › master › docs › source-pytorch › tuning › profiler_basic.rst
pytorch-lightning/docs/source-pytorch/tuning/profiler_basic.rst at master · Lightning-AI/pytorch-lightning
The most basic profile measures all the key methods across Callbacks, DataModules and the LightningModule in the training loop. ... FIT Profiler Report ------------------------------------------------------------------------------------------- ...
Author   Lightning-AI
🌐
PyTorch Lightning
pytorch-lightning.readthedocs.io › en › 1.2.10 › api › pytorch_lightning.profiler.profilers.html
profilers — PyTorch Lightning 1.2.10 documentation
Profiler to check if there are any bottlenecks in your code. class pytorch_lightning.profiler.profilers.AdvancedProfiler(output_filename=None, line_count_restriction=1.0)[source]¶
🌐
PyTorch Lightning
pytorch-lightning.readthedocs.io › en › 1.6.0 › advanced › profiler.html
Profiler - PyTorch Lightning 2.0.2 documentation
This profiler will record training_step, backward, validation_step, test_step, and predict_step by default. The output below shows the profiling for the action training_step. The user can provide PyTorchProfiler(record_functions={...}) to extend the scope of profiled functions.
🌐
Lightning AI
lightning.ai › docs › pytorch › stable › tuning › profiler_intermediate.html
Find bottlenecks in your code (intermediate) — PyTorch Lightning 2.6.1 documentation
This profiler will record training_step, validation_step, test_step, and predict_step. The output above shows the profiling for the action training_step. ... When using the PyTorch Profiler, wall clock time will not be representative of the true wall clock time.
🌐
Lightning AI
lightning.ai › docs › pytorch › 1.6.2 › advanced › profiler.html
Profiling — PyTorch Lightning 1.6.2 documentation
Profiling your training/testing/inference run can help you identify bottlenecks in your code. The reports can be generated with trainer.fit(), trainer.test(), trainer.validate() and trainer.predict() for their respective actions. PyTorch Lightning supports profiling standard actions in the training loop out of the box, including: