🌐
PyTorch
docs.pytorch.org › recipes › pytorch profiler
PyTorch Profiler — PyTorch Tutorials 2.12.0+cu130 documentation
July 20, 2022 - This recipe explains how to use PyTorch profiler and measure the time and memory consumption of the model’s operators.
🌐
DeepSpeed
deepspeed.ai › home › tutorials
Using PyTorch Profiler with DeepSpeed for performance debugging - DeepSpeed
1 week ago - This tutorial describes how to use PyTorch Profiler with DeepSpeed.
🌐
Hugging Face
huggingface.co › blog › torch-profiler
Profiling in PyTorch (Part 1): A Beginner's Guide to torch.profiler
May 29, 2026 - No prerequisites apart from basic PyTorch. Treat this as a leisurely read with some "Aha!" moments. The structure of the post is intentionally question-led: we open a trace, ask "wait, why is that happening?", and chase the answer until something clicks. By the end you should know: how to set up torch.profiler and what it actually hands back,
🌐
GitHub
github.com › Quentin-Anthony › torch-profiling-tutorial
GitHub - Quentin-Anthony/torch-profiling-tutorial · GitHub
This tutorial seeks to teach users about using profiling tools such as nvsys, rocprof, and the torch profiler in a simple transformers training loop. We will cover how to use the PyTorch profiler to identify performance bottlenecks, understand ...
Starred by 579 users
Forked by 32 users
Languages   Python
🌐
H-huang
h-huang.github.io › tutorials › recipes › recipes › profiler_recipe.html
PyTorch Profiler — PyTorch Tutorials 1.8.1+cu102 documentation
This recipe explains how to use PyTorch profiler and measure the time and memory consumption of the model’s operators.
🌐
Habana
docs.habana.ai › en › latest › Profiling › Profiling_with_PyTorch.html
Profiling with PyTorch — Gaudi Documentation 1.23.0 documentation
1import torch 2import habana_frameworks.torch.core as htcore 3 4activities = [torch.profiler.ProfilerActivity.CPU] 5 6#CUDA: 7#device = torch.device('cuda:0') 8#activities.append(torch.profiler.ProfilerActivity.CUDA) 9 10#HPU: 11device = torch.device('hpu') 12activities.append(torch.profiler.ProfilerActivity.HPU) 13 14with torch.profiler.profile( 15 schedule=torch.profiler.schedule(wait=0, warmup=20, active=5, repeat=1), 16 activities=activities, 17 on_trace_ready=torch.profiler.tensorboard_trace_handler('./profile_logs')) as profiler: 18 for i in range(100): 19 input = torch.tensor([[i]*10]*10, dtype=torch.float32, device=device) 20 result = torch.matmul(input, input) 21 result.to('cpu') 22 htcore.mark_step() 23 profiler.step()
🌐
GitHub
gist.github.com › mingfeima › e08310d7e7bb9ae2a693adecf2d8a916
How to do performance profiling on PyTorch · GitHub
Usually the first step in performance optimization is to do profiling, e.g. to identify performance hotspots of a workload. This gist tells basic knowledge of performance profiling on PyTorch, you will get: ... This tutorial takes one of my recent projects - pssp-transformer as an example to guide you through path of PyTorch CPU peformance optimization.
🌐
PyTorch
docs.pytorch.org › reference api › torch.profiler
torch.profiler — PyTorch main documentation
The profiler will skip the first skip_first steps, then wait for wait steps, then do the warmup for the next warmup steps, then do the active recording for the next active steps and then repeat the cycle starting with wait steps.
Find elsewhere
🌐
PyTorch Lightning
pytorch-lightning.readthedocs.io › en › 1.5.10 › advanced › profiler.html
Performance and Bottleneck Profiler — PyTorch Lightning 1.5.10 documentation
This profiler will record training_step_and_backward, training_step, backward, validation_step, test_step, and predict_step by default. The output below shows the profiling for the action training_step_and_backward. The user can provide PyTorchProfiler(record_functions={...}) to extend the scope of profiled functions.
🌐
PyTorch
docs.pytorch.org › ecosystem › pytorch profiler with tensorboard
PyTorch Profiler With TensorBoard — PyTorch Tutorials 2.10.0+cu128 documentation
July 20, 2022 - This tutorial demonstrates how to use TensorBoard plugin with PyTorch Profiler to detect performance bottlenecks of the model.
🌐
APXML
apxml.com › courses › pytorch-for-tensorflow-developers › chapter-6-advanced-pytorch-features-tf-users › profiling-pytorch-code
PyTorch Profiler | Performance Optimization Guide
Visualizing PyTorch Profiler Output in TensorBoard, PyTorch Documentation, 2024 - A practical tutorial explaining how to leverage TensorBoard for visual analysis of profiler traces, facilitating bottleneck identification.
🌐
PyTorch
docs.pytorch.org › compilers › (beta) building a simple cpu performance profiler with fx
(beta) Building a Simple CPU Performance Profiler with FX — PyTorch Tutorials 2.9.0+cu128 documentation
July 20, 2022 - Capture PyTorch Python code in ... of the code · Build out a small class that will serve as a simple performance “profiler”, collecting runtime statistics about each part of the model from actual runs....
🌐
Pytorch-cn
pytorch-cn.com › tutorials › intermediate › tensorboard_profiler_tutorial.html
PyTorch Profiler With TensorBoard — PyTorch Tutorials 2.5.0+cu124 documentation
This tutorial demonstrates how to use TensorBoard plugin with PyTorch Profiler to detect performance bottlenecks of the model.
🌐
PyTorch
pytorch.org › blog › introducing-pytorch-profiler-the-new-and-improved-performance-tool
Introducing PyTorch Profiler – the new and improved performance tool – PyTorch
March 25, 2021 - Review PyTorch Profiler documentation, give Profiler a try and let us know about your experience. Provide your feedback on PyTorch Discussion Forum or file issues on PyTorch GitHub. Access comprehensive developer documentation for PyTorch · View Docs › · Get in-depth tutorials for beginners and advanced developers ·
🌐
H-huang
h-huang.github.io › tutorials › beginner › profiler.html
Profiling your PyTorch Module — PyTorch Tutorials 1.8.1+cu102 documentation
PyTorch includes a profiler API that is useful to identify the time and memory costs of various PyTorch operations in your code.
🌐
PyTorch Forums
discuss.pytorch.org › torch.compile
Profiling in PyTorch (Part 1): A Beginner's Guide to torch.profiler - torch.compile - PyTorch Forums
May 29, 2026 - I think this could serve as a great tutorial for anyone beginning their journey into profiling, optmization, or even kernel developement. Link: Profiling in PyTorch (Part 1): A Beginner's Guide to torch.profiler Any feedback, criticisms, or observations are very welcome!