---
title: locationNumber
framework: metal
role: symbol
role_heading: Instance Property
path: metal/mtldevice/locationnumber
---

# locationNumber

A specific GPU position based on its general location.

## Declaration

```swift
var locationNumber: Int { get }
```

## Discussion

Discussion The meaning of the location number depends on a device’s location property: For MTLDeviceLocation.builtIn, the location number is 0 for low-power GPUs (see isLowPower) and 1 for other GPUs. For MTLDeviceLocation.slot, the location number represents the slot. For MTLDeviceLocation.external, the location number represents the Thunderbolt port. note: It’s possible for multiple devices to share the same location and number. For example, a card in a slot may have multiple GPUs, or a person may connect multiple eGPUs to the same Thunderbolt port.

## See Also

### Identifying a GPU device

- [name](metal/mtldevice/name.md)
- [architecture](metal/mtldevice/architecture.md)
- [MTLArchitecture](metal/mtlarchitecture.md)
- [registryID](metal/mtldevice/registryid.md)
- [location](metal/mtldevice/location.md)
- [MTLDeviceLocation](metal/mtldevicelocation.md)
- [isLowPower](metal/mtldevice/islowpower.md)
- [isRemovable](metal/mtldevice/isremovable.md)
- [isHeadless](metal/mtldevice/isheadless.md)
- [peerGroupID](metal/mtldevice/peergroupid.md)
- [peerCount](metal/mtldevice/peercount.md)
- [peerIndex](metal/mtldevice/peerindex.md)
