trunk/df5fda033dc2de824e73fff97bdbd808d80ebed0: [MPS] Use histc and index_add_ atomic kernels for bincount (#201045)
- PyTorch: 2400 events in the last 90 days
- PyTorch: 2368th Release in the last 90 days
- Previous: earlier the same day · trunk/4862ce0dc3fd31f37cc1b0c9fa55d49eefa21d0c: [MPS] Add special_airy_ai (#195264)
What happened
Fixes #201038 MPS Graph integer scatter add was slow when most inputs fell ine a single bin. This PR changes it so that unweighted bincount uses histc kernel as on CUDA and weighted bincount uses index add. Perf x p weights main ms after ms speedup torch.randint(1, 64, (4194304,)) 0.999 - 6776.655 0.533 12718x torch.randint(1, 630, (4194304,)) 0.999 - 6269.008 0.548 11442x torch.randint(1, 630, (4194304,)) 0.999 tor…
Summary assembled by rule from the sources below