<!--
{
  "availability" : [
    "iOS: 14.0.0 - 17.4.0",
    "iPadOS: 14.0.0 - 17.4.0",
    "macCatalyst: 14.0.0 - 17.4.0",
    "macOS: 11.0.0 - 14.3.0",
    "tvOS: 14.0.0 - 17.4.0"
  ],
  "documentType" : "symbol",
  "framework" : "MLCompute",
  "identifier" : "/documentation/MLCompute/MLCTensor/bindOptimizerData(_:deviceData:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "ML Compute"
    ],
    "preciseIdentifier" : "c:objc(cs)MLCTensor(im)bindOptimizerData:deviceData:"
  },
  "title" : "bindOptimizerData(_:deviceData:)"
}
-->

# bindOptimizerData(_:deviceData:)

Associates the optimizer and device data buffers you specify to the tensor.

```
func bindOptimizerData(_ data: [MLCTensorData], deviceData: [MLCTensorOptimizerDeviceData]?) -> Bool
```

## Parameters

`data`

An array that contains the optimizer data to associate with the tensor.

`deviceData`

An array that contains the optimizer device data to associate with the tensor.

## Return Value

`true` if the framework successfully associated the data and device data with the tensor; otherwise, `false`.

## Discussion

---

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)