<!--
{
  "availability" : [
    "iOS: 13.0.0 -",
    "iPadOS: 13.0.0 -",
    "macCatalyst: 13.1.0 -",
    "macOS: 10.15.0 -",
    "tvOS: 13.0.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "Metal",
  "identifier" : "/documentation/Metal/MTLGPUFamily/init(rawValue:)",
  "metadataVersion" : "0.1.0",
  "role" : "Initializer",
  "symbol" : {
    "kind" : "Initializer",
    "modules" : [
      "Metal"
    ],
    "preciseIdentifier" : "s:So12MTLGPUFamilyV8rawValueABSgSi_tcfc"
  },
  "title" : "init(rawValue:)"
}
-->

# init(rawValue:)

Creates a GPU family instance from a raw value.

```
init?(rawValue: Int)
```

## Parameters

`rawValue`

An integer value that represents a GPU family.

## Discussion

You don’t need to call this initializer because it’s part of how Swift
represents an enumeration from an Objective-C framework.

> Tip:
> Use one of the ``doc://com.apple.metal/documentation/Metal/MTLGPUFamily`` cases, such as ``doc://com.apple.metal/documentation/Metal/MTLGPUFamily/metal3``,
> instead of this initializer.

---

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)