<!--
{
  "availability" : [
    "macOS: 10.15.0 - 27.0.0"
  ],
  "documentType" : "symbol",
  "framework" : "Metal",
  "identifier" : "/documentation/Metal/MTLDevice/locationNumber",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Property",
  "symbol" : {
    "kind" : "Instance Property",
    "modules" : [
      "Metal"
    ],
    "preciseIdentifier" : "c:objc(pl)MTLDevice(py)locationNumber"
  },
  "title" : "locationNumber"
}
-->

# locationNumber

A specific GPU position based on its general location.

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

## Discussion

The meaning of the location number depends on a device’s [`location`](/documentation/Metal/MTLDevice/location) property:

- For [`MTLDeviceLocation.builtIn`](/documentation/Metal/MTLDeviceLocation/builtIn), the location number is `0` for low-power GPUs (see [`isLowPower`](/documentation/Metal/MTLDevice/isLowPower)) and `1` for other GPUs.
- For [`MTLDeviceLocation.slot`](/documentation/Metal/MTLDeviceLocation/slot), the location number represents the slot.
- For [`MTLDeviceLocation.external`](/documentation/Metal/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.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)