---
title: MPSGraphStencilOpDescriptor
framework: metalperformanceshadersgraph
role: symbol
role_heading: Class
path: metalperformanceshadersgraph/mpsgraphstencilopdescriptor
---

# MPSGraphStencilOpDescriptor

The class that defines the parameters for a stencil operation.

## Declaration

```swift
class MPSGraphStencilOpDescriptor
```

## Overview

Overview Use this descriptor with the following MPSGraph method: stencil(withSourceTensor:weightsTensor:descriptor:name:)

## Topics

### Initializers

- [init(explicitPadding:)](metalperformanceshadersgraph/mpsgraphstencilopdescriptor/init(explicitpadding:).md)
- [init(offsets:explicitPadding:)](metalperformanceshadersgraph/mpsgraphstencilopdescriptor/init(offsets:explicitpadding:).md)
- [init(paddingStyle:)](metalperformanceshadersgraph/mpsgraphstencilopdescriptor/init(paddingstyle:).md)
- [init(reductionMode:offsets:strides:dilationRates:explicitPadding:boundaryMode:paddingStyle:paddingConstant:)](metalperformanceshadersgraph/mpsgraphstencilopdescriptor/init(reductionmode:offsets:strides:dilationrates:explicitpadding:boundarymode:paddingstyle:paddingconstant:).md)

### Instance Properties

- [boundaryMode](metalperformanceshadersgraph/mpsgraphstencilopdescriptor/boundarymode.md)
- [dilationRates](metalperformanceshadersgraph/mpsgraphstencilopdescriptor/dilationrates.md)
- [explicitPadding](metalperformanceshadersgraph/mpsgraphstencilopdescriptor/explicitpadding.md)
- [offsets](metalperformanceshadersgraph/mpsgraphstencilopdescriptor/offsets.md)
- [paddingConstant](metalperformanceshadersgraph/mpsgraphstencilopdescriptor/paddingconstant.md)
- [paddingStyle](metalperformanceshadersgraph/mpsgraphstencilopdescriptor/paddingstyle.md)
- [reductionMode](metalperformanceshadersgraph/mpsgraphstencilopdescriptor/reductionmode.md)
- [strides](metalperformanceshadersgraph/mpsgraphstencilopdescriptor/strides.md)

## Relationships

### Inherits From

- [MPSGraphObject](metalperformanceshadersgraph/mpsgraphobject.md)

### Conforms To

- [CVarArg](swift/cvararg.md)
- [CustomDebugStringConvertible](swift/customdebugstringconvertible.md)
- [CustomStringConvertible](swift/customstringconvertible.md)
- [Equatable](swift/equatable.md)
- [Hashable](swift/hashable.md)
- [NSCopying](foundation/nscopying.md)
- [NSObjectProtocol](objectivec/nsobjectprotocol.md)

## See Also

### Classes

- [MPSGraph](metalperformanceshadersgraph/mpsgraph.md)
- [MPSGraphCompilationDescriptor](metalperformanceshadersgraph/mpsgraphcompilationdescriptor.md)
- [MPSGraphConvolution2DOpDescriptor](metalperformanceshadersgraph/mpsgraphconvolution2dopdescriptor.md)
- [MPSGraphConvolution3DOpDescriptor](metalperformanceshadersgraph/mpsgraphconvolution3dopdescriptor.md)
- [MPSGraphCreateSparseOpDescriptor](metalperformanceshadersgraph/mpsgraphcreatesparseopdescriptor.md)
- [MPSGraphDepthwiseConvolution2DOpDescriptor](metalperformanceshadersgraph/mpsgraphdepthwiseconvolution2dopdescriptor.md)
- [MPSGraphDepthwiseConvolution3DOpDescriptor](metalperformanceshadersgraph/mpsgraphdepthwiseconvolution3dopdescriptor.md)
- [MPSGraphDevice](metalperformanceshadersgraph/mpsgraphdevice.md)
- [MPSGraphExecutable](metalperformanceshadersgraph/mpsgraphexecutable.md)
- [MPSGraphExecutableExecutionDescriptor](metalperformanceshadersgraph/mpsgraphexecutableexecutiondescriptor.md)
- [MPSGraphExecutableSerializationDescriptor](metalperformanceshadersgraph/mpsgraphexecutableserializationdescriptor.md)
- [MPSGraphExecutionDescriptor](metalperformanceshadersgraph/mpsgraphexecutiondescriptor.md)
- [MPSGraphFFTDescriptor](metalperformanceshadersgraph/mpsgraphfftdescriptor.md)
- [MPSGraphGRUDescriptor](metalperformanceshadersgraph/mpsgraphgrudescriptor.md)
- [MPSGraphImToColOpDescriptor](metalperformanceshadersgraph/mpsgraphimtocolopdescriptor.md)
