---
title: device
framework: metal
role: symbol
role_heading: Instance Property
path: metal/mtl4commandqueue/device
---

# device

Returns the GPU device that the command queue belongs to.

## Declaration

```swift
var device: any MTLDevice { get }
```
