> ## Documentation Index
> Fetch the complete documentation index at: https://se7en.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# 性能分析

> 训练与推理的 Roofline、Benchmark、Nsight 和 Profiling 资料

## 体系化学习

| 资源                                                                                                               | 类型   | 简介                                                                | 配套资料                                                            |
| ---------------------------------------------------------------------------------------------------------------- | ---- | ----------------------------------------------------------------- | --------------------------------------------------------------- |
| [AI Systems Performance Engineering](https://www.oreilly.com/library/view/ai-systems-performance/9798341627772/) | 书籍   | 讲解 GPU CUDA Kernel 调优、PyTorch 算法优化、多节点训练和推理系统优化，并附有 175 多项实战优化清单。 | [GitHub](https://github.com/cfregly/ai-performance-engineering) |
| [How to Scale Your Model](https://jax-ml.github.io/scaling-book/)                                                | 在线书籍 | 涵盖 Roofline 分析、硬件互连、Transformer 计算与内存、并行策略，以及训练和推理的性能分析。          | [GitHub](https://github.com/jax-ml/scaling-book)                |
| [CSCI 1390, Spring 2025: Systems for Machine Learning](https://cs.brown.edu/courses/csci1390/)                   | 课程   | 主题包括高效训练和推理、ML 算法性能、GPU 编程、CUDA 和 Transformer 架构。                 |                                                                 |

## 训练性能

| 资源                                                                                                      | 类型   | 简介                                                              |
| ------------------------------------------------------------------------------------------------------- | ---- | --------------------------------------------------------------- |
| [Stanford CS336 Assignment 2: Systems](https://github.com/stanford-cs336/assignment2-systems/tree/main) | 实践课程 | 围绕 Transformer 训练系统实践性能基准测试、分析与优化，并实现分布式训练。整体计算资源要求不高，强烈推荐完整完成。 |

## Profiling 工具

| 资源                                                                                               | 类型 | 简介                                                                                               |
| ------------------------------------------------------------------------------------------------ | -- | ------------------------------------------------------------------------------------------------ |
| [PyTorch Profiling with NVIDIA Nsight](https://docs.lxp.lu/howto/pytorch-profiling-with-nsight/) | 教程 | 详细讲解 Nsight Systems 和 Nsight Compute 的分工、报告采集、CLI 与 UI 分析、NVTX 标记、时间线解读，以及 PyTorch 常见性能瓶颈的诊断与优化。 |
