An object used to customize how a new compute pipeline state object is compiled.


@interface MTLComputePipelineDescriptor : NSObject


To create a MTLComputePipelineState object, you create a pipeline descriptor, configure its properties, and pass it to one of the creation methods on a MTLDevice object. See Creating a Compute Pipeline.

Use standard allocation and initialization techniques to create a MTLComputePipelineDescriptor object and configure its properties. The most important property to set is the computeFunction property, which specifies which Metal function to call.


Specifying the Compute Function and Associated Data


The compute function to be compiled into the pipeline state object.


A Boolean that indicates whether the threadgroup size must always be a multiple of the thread execution width.


The maximum number of threads allowed for a threadgroup dispatched to the compute function.


The organization of input and output data for the compute function.


The buffer mutability options for a compute pipeline's kernel function.


An object that contains the mutability options for buffers used in a render or compute pass.

Identifying Properties


A string that identifies this object.

Resetting the Compute Pipeline State

- reset

Resets all compute pipeline descriptor properties to their default values.

Instance Properties


Inherits From

Conforms To

See Also

Parallel Computation

Hello Compute

Demonstrates how to perform data-parallel computations using the GPU.

About Threads and Threadgroups

Learn how Metal organizes compute-processing workloads.

Calculating Threadgroup and Grid Sizes

Calculate the optimum sizes for threadgroups and grids when dispatching compute-processing workloads.


An object that contains a compiled compute pipeline.


An object used to encode commands in a compute pass.

Beta Software

This documentation contains preliminary information about an API or technology in development. This information is subject to change, and software implemented according to this documentation should be tested with final operating system software.

Learn more about using Apple's beta software