<!--
{
  "availability" : [
    "iOS: 15.0.0 - 17.0.0",
    "iPadOS: 15.0.0 - 17.0.0",
    "macCatalyst: 15.0.0 - 17.0.0",
    "macOS: 12.0.0 - 14.0.0",
    "tvOS: 15.0.0 - 17.0.0"
  ],
  "documentType" : "symbol",
  "framework" : "MLCompute",
  "identifier" : "/documentation/MLCompute/MLCTrainingGraph/executeOptimizerUpdate(options:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "ML Compute",
      "MLCompute"
    ],
    "preciseIdentifier" : "s:So16MLCTrainingGraphC9MLComputeE22executeOptimizerUpdate7optionsSdSo19MLCExecutionOptionsV_tYaKF"
  },
  "title" : "executeOptimizerUpdate(options:)"
}
-->

# executeOptimizerUpdate(options:)

Executes the optimizer update pass of the training graph with the execution options you specify.

```
@discardableResult func executeOptimizerUpdate(options: MLCExecutionOptions = []) async throws -> TimeInterval
```

## Parameters

`options`

The execution options.

## Return Value

The execution time if you specify [`profiling`](/documentation/MLCompute/MLCExecutionOptions/profiling).

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)