---
title: forwardForInference
framework: ML Compute
role: symbol
role_heading: Type Property
platforms: [iOS 14.0+, iPadOS 14.0+, Mac Catalyst 14.0+, macOS 11.0+, tvOS 14.0+]
path: mlcompute/mlcexecutionoptions/forwardforinference
---

# forwardForInference

The option to execute the forward pass for inference only.

## Declaration

```swift
static var forwardForInference: MLCExecutionOptions { get }
```

## Discussion

Discussion If you include this option and execute a training graph using one of the execute methods, such as execute(inputsData:lossLabelsData:lossLabelWeightsData:batchSize:options:completionHandler:), the framework only executes the forward pass of the training graph, and it executes that forward pass for inference only. If you include this option and execute a training graph using one of the executeForward methods, such as executeForward(batchSize:options:completionHandler:), the framework executes the forward pass for inference only.

## See Also

### Execution Options

- [init(rawValue:)](mlcompute/mlcexecutionoptions/init(rawvalue:).md)
- [skipWritingInputDataToDevice](mlcompute/mlcexecutionoptions/skipwritinginputdatatodevice.md)
- [synchronous](mlcompute/mlcexecutionoptions/synchronous.md)
- [profiling](mlcompute/mlcexecutionoptions/profiling.md)
- [perLayerProfiling](mlcompute/mlcexecutionoptions/perlayerprofiling.md)
