↓ 跳过正文

性能优化

Kernels、Triton 与 Profiling:CS336 Lecture 6 笔记

··3493 字·7 分钟
从硬件抽象进入 kernel 编程实践:warp/occupancy/bank conflict/coalescing 如何映射到性能,benchmarking 与 profiling 方法论,以及用 Triton 实现 GeLU、softmax、row sum、matmul+ReLU 四个 kernel。

GPU 架构与 FlashAttention:CS336 Lecture 5 笔记

··4504 字·9 分钟
从模型结构转入系统视角:为什么 LLM 必须依赖 GPU、GPU 的执行模型与内存层次、arithmetic intensity 与 roofline model,以及如何用这套性能模型解释 FlashAttention 这类 IO-aware 算法。