---
title: metalDevice
framework: metalperformanceshadersgraph
role: symbol
role_heading: Instance Property
path: metalperformanceshadersgraph/mpsgraphdevice/metaldevice
---

# metalDevice

If device type is Metal then returns the corresponding MTLDevice else nil.

## Declaration

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