技巧精选

Mark Saroufim 在 PyTorchCon 2026 讲解优化器背后的线性代数核

精选理由

Mark 在 PyTorchCon 上拆了优化器的线性代数内核,讲清楚为什么训练步数少不等于快,做训练优化的可以看。

Mark Saroufim 在 #PyTorchCon 2026 上指出,更少的训练步数不一定等于更快的训练。他以 QR 分解、对称特征值分解和 Cholesky 分解为例,剖析优化器的线性代数内核实现。内容借鉴了 GPU MODE 线性代数比赛的观察,讲解顺序依赖如何限制 GPU 并行执行,以及如何通过暴露并行工作、重叠独立阶段和合并更新来减少数据搬运。

原文 · PyTorch

@marksaroufim Fewer training steps don’t necessarily mean faster training. At #PyTorchCon 2026 (@coreauto) examines the linear algebra kernels behind better optimizers.

Mark focuses on QR, symmetric eigendecomposition, and Cholesky, drawing lessons from GPU MODE’s linear algebra competition.

He explains how sequential dependencies constrain GPU execution, and how implementations expose parallel work, overlap independent stages, and combine updates to reduce data movement.