---
title: preferredMetalDevice
framework: coreml
role: symbol
role_heading: Instance Property
path: coreml/mlmodelconfiguration/preferredmetaldevice
---

# preferredMetalDevice

The metal device you prefer this model use to make predictions (inference) and update the model.

## Declaration

```swift
var preferredMetalDevice: (any MTLDevice)? { get set }
```

## Discussion

Discussion If preferredMetalDevice is nil, the default value, Core ML chooses a metal device for you.

## See Also

### Configuring GPU usage

- [allowLowPrecisionAccumulationOnGPU](coreml/mlmodelconfiguration/allowlowprecisionaccumulationongpu.md)
