<!--
{
  "availability" : [
    "iOS: 27.0.0 -",
    "iPadOS: 27.0.0 -",
    "tvOS: 27.0.0 -",
    "visionOS: 27.0.0 -",
    "watchOS: 27.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "CoreAI",
  "identifier" : "/documentation/CoreAI/SpecializationOptions/preferredComputeUnitKind",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Property",
  "symbol" : {
    "kind" : "Instance Property",
    "modules" : [
      "Core AI"
    ],
    "preciseIdentifier" : "s:15CoreAIDelegates21SpecializationOptionsV24preferredComputeUnitKindAA0fgH0OSgvp"
  },
  "title" : "preferredComputeUnitKind"
}
-->

# preferredComputeUnitKind

The preferred compute unit kind, if one was specified.

```
var preferredComputeUnitKind: ComputeUnitKind? { get }
```

## Discussion

When set, the specialization process maximizes use of this compute
unit kind. Fallback to other kinds in [`allowedComputeUnitKinds`](/documentation/CoreAI/SpecializationOptions/allowedComputeUnitKinds) may still
occur for operations or operation patterns that are incompatible with the
preferred kind. Operation patterns refer to groups of operations that are
fused or transformed together during specialization; an operation that
is individually compatible with the preferred unit kind may be part of a
fused pattern that is not.

---

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)