<!--
{
  "availability" : [
    "iOS: 14.0.0 -",
    "iPadOS: 14.0.0 -",
    "macCatalyst: 14.0.0 -",
    "macOS: 11.0.0 -",
    "tvOS: 14.0.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "MetalPerformanceShadersGraph",
  "identifier" : "/documentation/MetalPerformanceShadersGraph/MPSGraphPooling2DOpDescriptor",
  "metadataVersion" : "0.1.0",
  "role" : "Class",
  "symbol" : {
    "kind" : "Class",
    "modules" : [
      "Metal Performance Shaders Graph"
    ],
    "preciseIdentifier" : "c:objc(cs)MPSGraphPooling2DOpDescriptor"
  },
  "title" : "MPSGraphPooling2DOpDescriptor"
}
-->

# MPSGraphPooling2DOpDescriptor

The class that defines the parameters for a 2D pooling operation.

```
class MPSGraphPooling2DOpDescriptor
```

## Overview

Use this descriptor with the following methods:

- [`maxPooling2D(withSourceTensor:descriptor:name:)`](/documentation/MetalPerformanceShadersGraph/MPSGraph/maxPooling2D(withSourceTensor:descriptor:name:))
- [`maxPooling2DReturnIndices(_:descriptor:name:)`](/documentation/MetalPerformanceShadersGraph/MPSGraph/maxPooling2DReturnIndices(_:descriptor:name:))
- [`maxPooling2DGradient(withGradientTensor:sourceTensor:descriptor:name:)`](/documentation/MetalPerformanceShadersGraph/MPSGraph/maxPooling2DGradient(withGradientTensor:sourceTensor:descriptor:name:))
- [`maxPooling2DGradient(withGradientTensor:indicesTensor:outputShape:descriptor:name:)`](/documentation/MetalPerformanceShadersGraph/MPSGraph/maxPooling2DGradient(withGradientTensor:indicesTensor:outputShape:descriptor:name:))
- [`maxPooling2DGradient(withGradientTensor:indicesTensor:outputShapeTensor:descriptor:name:)`](/documentation/MetalPerformanceShadersGraph/MPSGraph/maxPooling2DGradient(withGradientTensor:indicesTensor:outputShapeTensor:descriptor:name:))
- [`avgPooling2D(withSourceTensor:descriptor:name:)`](/documentation/MetalPerformanceShadersGraph/MPSGraph/avgPooling2D(withSourceTensor:descriptor:name:))
- [`avgPooling2DGradient(withGradientTensor:sourceTensor:descriptor:name:)`](/documentation/MetalPerformanceShadersGraph/MPSGraph/avgPooling2DGradient(withGradientTensor:sourceTensor:descriptor:name:))

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)