The torch.profiler tool allows developers to analyze CPU and GPU execution times. This guide explains how to identify bottlenecks and optimize memory usage during model training. It focuses on the basic API and visualization tools. Practitioners can use these insights to reduce latency and improve hardware utilization in PyTorch workflows.