description
TypeScriptget description(): stringSwift declarationvar description: String { get }A textual representation of the compute policy.
struct · iOS 18.0+ · SDK 27.1
struct MLComputePolicyThe compute policy determining what compute device, or compute devices, to execute ML workloads on.
get description(): stringSwift declarationvar description: String { get }A textual representation of the compute policy.
get customMirror(): SDKHandleSwift declarationvar customMirror: Mirror { get }The custom mirror for `MLComputePolicy`.
static get cpuOnly(): MLComputePolicySwift declarationstatic var cpuOnly: MLComputePolicy { get }Execute ML workloads using the CPU.
static get cpuAndGPU(): MLComputePolicySwift declarationstatic var cpuAndGPU: MLComputePolicy { get }Execute ML workloads using the GPU if available, otherwise falling back to the CPU.
static init(computeUnits: MLComputeUnits): MLComputePolicySwift declarationinit(_ computeUnits: MLComputeUnits)Creates a new compute policy using the given compute units.
No declarations were skipped in this snapshot.