---
title: kernelWidth
framework: metalperformanceshaders
role: symbol
role_heading: Instance Property
path: metalperformanceshaders/mpscnnconvolutiondescriptor/kernelwidth
---

# kernelWidth

The width of the kernel window.

## Declaration

```swift
var kernelWidth: Int { get set }
```

## Discussion

Discussion The default value is 3. Any positive non-zero value is valid, including even values. The position of the left edge of the kernel window is given by offset.x - (kernelWidth>>1).

## See Also

### Instance Properties

- [groups](metalperformanceshaders/mpscnnconvolutiondescriptor/groups.md)
- [inputFeatureChannels](metalperformanceshaders/mpscnnconvolutiondescriptor/inputfeaturechannels.md)
- [kernelHeight](metalperformanceshaders/mpscnnconvolutiondescriptor/kernelheight.md)
- [outputFeatureChannels](metalperformanceshaders/mpscnnconvolutiondescriptor/outputfeaturechannels.md)
- [strideInPixelsX](metalperformanceshaders/mpscnnconvolutiondescriptor/strideinpixelsx.md)
- [strideInPixelsY](metalperformanceshaders/mpscnnconvolutiondescriptor/strideinpixelsy.md)
- [neuron](metalperformanceshaders/mpscnnconvolutiondescriptor/neuron.md)
- [dilationRateX](metalperformanceshaders/mpscnnconvolutiondescriptor/dilationratex.md)
- [dilationRateY](metalperformanceshaders/mpscnnconvolutiondescriptor/dilationratey.md)
- [neuronParameterA()](metalperformanceshaders/mpscnnconvolutiondescriptor/neuronparametera().md)
- [neuronParameterB()](metalperformanceshaders/mpscnnconvolutiondescriptor/neuronparameterb().md)
- [neuronType()](metalperformanceshaders/mpscnnconvolutiondescriptor/neurontype().md)
- [fusedNeuronDescriptor](metalperformanceshaders/mpscnnconvolutiondescriptor/fusedneurondescriptor.md)
