<!--
{
  "availability" : [
    "macOS: 10.10.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "CoreImage",
  "identifier" : "/documentation/CoreImage/CIContext/offlineGPUCount()",
  "metadataVersion" : "0.1.0",
  "role" : "Type Method",
  "symbol" : {
    "kind" : "Type Method",
    "modules" : [
      "Core Image",
      "CoreImage"
    ],
    "preciseIdentifier" : "c:objc(cs)CIContext(cm)offlineGPUCount"
  },
  "title" : "offlineGPUCount()"
}
-->

# offlineGPUCount()

Returns the number of GPUs not currently driving a display.

```
class func offlineGPUCount() -> UInt32
```

## Return Value

The number of offline GPU devices.

## Discussion

If this count is greater than zero, the system has attached GPU devices that are not currently driving a display. You can use these devices for Core Image rendering by creating a context with the [`init(forOfflineGPUAtIndex:)`](/documentation/CoreImage/CIContext/init(forOfflineGPUAtIndex:)) or[`init(forOfflineGPUAtIndex:colorSpace:options:sharedContext:)`](/documentation/CoreImage/CIContext/init(forOfflineGPUAtIndex:colorSpace:options:sharedContext:)) method.

---

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)