Skip to main content
grasp.study
About
Explore
Pricing
Log in
Try it for free
Back to course
๐
Welcome to a Grasp lesson
Create a free account
to keep studying and create your own study path.
PyTorch Memory Profiling & Viz
ยท
Module 1
PyTorch Memory: Fundamentals and Quick Inspection
1
Understanding Reserved vs. Allocated GPU Memory in PyTorch
Explain the difference between reserved and allocated GPU memory in PyTorch using `torch.cuda.memory_summary()`.
2
Measuring and Reducing Peak Memory Usage in PyTorch
Use `torch.cuda.max_memory_allocated()` and context managers (e.g., `torch.no_grad()`) to measure and reduce the peak memory of a specific code block.
3
Diagnosing OutOfMemoryError (OOM) Causes
Diagnose common causes of OutOfMemoryError (OOM), such as large batch sizes and un-released tensor references.
Previous module
Next module
In-Depth Analysis with PyTorch Profiler & TensorBoard