KEMBAR78
Add support for MaxPool3D on the MPS backend · Issue #100674 · pytorch/pytorch · GitHub
Skip to content

Add support for MaxPool3D on the MPS backend #100674

@Berzeg

Description

@Berzeg

🚀 The feature, motivation and pitch

Currently, Pooling operations are only supported on MPS for 1D and 2D inputs. While MPS doesn't have native support for 3d pooling operations, it does support 4d pooling operations (e.g. maxPooling4DWithSourceTensor()). 3d tensors can be expanded to become 4d tensors, passed to 4d pooling operations, and then squeezed back to 3d tensors. This wouldn't affect the accuracy of the results when compared to direct 3d pooling operations. So, we can start working to add support for 3d pooling operations on the MPS backend.

cc @kulinseth @albanD @malfet @DenisVieriu97 @jhavukainen @razarmehr @abhudev @mattiaspaul

Alternatives

No response

Additional context

This feature, along with the introduction of 3d convolutions in #99246 would open up lots of possible model architectures for 3D inputs.
Full disclosure: I already have a working implementation of MaxPool3D support for MPS, and @mattiaspaul already has something in the works to address this as well.

Metadata

Metadata

Assignees

Labels

enhancementNot as big of a feature, but technically not a bug. Should be easy to fixmodule: mpsRelated to Apple Metal Performance Shaders frameworktriagedThis issue has been looked at a team member, and triaged and prioritized into an appropriate module

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions