---
title: "setPipelineState(_:)"
framework: metal
role: symbol
role_heading: Instance Method
path: "metal/mtl4machinelearningcommandencoder/setpipelinestate(_:)"
---

# setPipelineState(_:)

Configures the encoder with a machine learning pipeline state instance.

## Declaration

```swift
func setPipelineState(_ pipelineState: any MTL4MachineLearningPipelineState)
```

## Parameters

- `pipelineState`: A Machine Learning pipeline state instance.

## Discussion

Discussion The pipeline state instance affects all subsequent Machine Learning commands.

## See Also

### Configuring the pass

- [setArgumentTable(_:)](metal/mtl4machinelearningcommandencoder/setargumenttable(_:).md)
