trunk/1776b988238f9978a57690ad7e9b37bff539555c: [MPS] Replace MPSGraph max_pool2d forward with Metal kernels (#201756)
- PyTorch 近 90 天出现 2706 次
- PyTorch 近 90 天第 2663 次发版
- 上一次:同一天稍早 · trunk/76bb73d4599d7fde5957268de00fcaacebadbec7
发生了什么
The generic max_pool Metal kernel decomposes the thread id with per-dim div/mod by runtime sizes and is ~8x slower than memory bandwidth allows. That is why stride-1 max_pool2d was routed to MPSGraph, which silently drops NaNs. The Metal kernel dropped them too, unless a NaN was the first element of the window, as it compared with a plain > . Add two specializations of it for 2D pooling of dense tensors, both reusin…
摘要按规则整理自下方来源原文