跳到正文
原文
Hugging Face Blog·· 2026-05-29精选AI 评分70

PyTorch 性能分析(第 1 部分):torch.profiler 入门指南

Profiling in PyTorch (Part 1): A Beginner's Guide to torch.profiler

AI 导读

这篇入门教程以 PyTorch 的矩阵乘加为例,介绍如何设置 torch.profiler 并读取 profiler table 和 trace。

推荐理由

文章以矩阵乘加为例,拆解 torch.profiler 的表格、时间线与 CPU 到 CUDA kernel 的调度链,并比较 torch.compile 前后的差异。

来源:Hugging Face Blog · huggingface.co