viable/strict/1790286648: [BE] Refactor reductions on MPS (#198494)
- PyTorch 近 90 天出现 1440 次
- PyTorch 近 90 天第 1421 次发版
- 上一次:同一天稍早 · viable/strict/1790285170: [Profiler] Remove deprecated metadata json field (#198265)
发生了什么
Refactor reductions on MPS. I believe code is now better readable and more concise. ReductionKernel which defines what kind of kernels we have, ReductionLayout which is a struct for the layout of the reshaped tensor. As an example given a tensor of [128, 128, 1024, 64, 32, 16].sum(dim=2) we reshape it in a following way -> [outer_size, dim, inner_size] , where outer_size is prod of all numbers before dim=2, i.e. bei…
摘要按规则整理自下方来源原文