title: Function(depthwiseConvolution): missing threadgroupMemory binding at index 0 for lM[0]
body: <p>I'm trying to execute a simple DepthwiseConvolution kernel with Metal Performance Shaders on MacOS and have problems with it. First I initialize an <code>MPSImage</code> (called <code>debugInputImage</code>) with proper size filled with some number, say <code>1.0</code>. Then I create my convolutional kernel:</p>
  
  <pre><code>convolution_depthwise_0 = MPSCNNConvolution(device: device, 
      weights: datasource_depthwise_0)
  </code></pre>
  
  <p>Where <code>datasource_depthwise_0</code> is an instance of <code>MPSCNNConvolutionDataSource</code> with the following descriptor:</p>
  
  <pre><code>func descriptor() -&gt; MPSCNNConvolutionDescriptor {
      var desc = MPSCNNDepthWiseConvolutionDescriptor(kernelWidth: 3,
          kernelHeight: 3,
          inputFeatureChannels: 32,
          outputFeatureChannels: 32)
      return desc
  }
  </code></pre>
  
  <p>This is how I initialise the input image:</p>
  
  <pre><code>let imageDescriptor = MPSImageDescriptor(channelFormat: .float16, 
      width: 256, height: 256, featureChannels: 32)
  
  debugInputImage = MPSImage(device: device, 
      imageDescriptor: imageDescriptor)
  
  var arrayOfOnes = Array(repeating: Float(1.0), 
      count: imageDescriptor.width * imageDescriptor.height 
          * imageDescriptor.featureChannels)
  
  
  let arrayOfOnes16 = toFloat16(&amp;arrayOfOnes, size: arrayOfOnes.count)
  
  debugInputImage.writeBytes(arrayOfOnes16, 
      dataLayout: MPSDataLayout.HeightxWidthxFeatureChannels, imageIndex: 0)
  </code></pre>
  
  <p>When I run all of this:</p>
  
  <pre><code>let commandBuffer = commandQueue.makeCommandBuffer()!
  let outImage = convolution_depthwise_0.encode(commandBuffer: commandBuffer, 
      sourceImage: debugInputImage)
  </code></pre>
  
  <p>And get this error (at this line <code>let outImage = convolution_depthwise_0.encode(...</code>):</p>
  
  <pre><code>validateComputeFunctionArguments:860: failed assertion `Compute 
  Function(depthwiseConvolution): missing threadgroupMemory binding 
  at index 0 for lM[0].'
  </code></pre>
  
  <p>For regular convolution everything is fine, only for Depthwise I get this problem.</p>
  
  <p>What could be the reason for that error?</p>
  
  <p>System: MacOS 10.14, XCode 10.1 beta 3</p>
  
  <p>Only MPSCNNDepthWiseConvolutionDescriptor doesn't work. I have no problems with MPSCNNConvolutionDescriptor. I also have no problems on iOS, only Mac OS.</p>