<!--
{
  "documentType" : "article",
  "framework" : "Metal",
  "identifier" : "/documentation/Metal/device-inspection",
  "metadataVersion" : "0.1.0",
  "role" : "collectionGroup",
  "title" : "Device inspection"
}
-->

# Device inspection

Locate and identify a GPU and the features it supports, and sample its counters.

## Topics

### Checking a GPU device’s feature support

[`supportsFamily(_:)`](/documentation/Metal/MTLDevice/supportsFamily(_:))

Returns a Boolean value that indicates whether the GPU device supports the feature set of a specific GPU family.

[`MTLGPUFamily`](/documentation/Metal/MTLGPUFamily)

Represents the functionality for families of GPUs.

[`supportsFeatureSet(_:)`](/documentation/Metal/MTLDevice/supportsFeatureSet(_:))

Returns a Boolean value that indicates whether the GPU device supports a specific feature set.

[`MTLFeatureSet`](/documentation/Metal/MTLFeatureSet)

The device feature sets that define specific platform, hardware, and software configurations.

### Checking compute support

[`maxThreadgroupMemoryLength`](/documentation/Metal/MTLDevice/maxThreadgroupMemoryLength)

The maximum threadgroup memory available to a compute kernel, in bytes.

[`maxThreadsPerThreadgroup`](/documentation/Metal/MTLDevice/maxThreadsPerThreadgroup)

The maximum number of threads along each dimension of a threadgroup.

### Checking render support

[`supportsRaytracing`](/documentation/Metal/MTLDevice/supportsRaytracing)

A Boolean value that indicates whether the GPU device supports ray tracing.

[`supportsPrimitiveMotionBlur`](/documentation/Metal/MTLDevice/supportsPrimitiveMotionBlur)

A Boolean value that indicates whether the GPU device supports motion blur for ray tracing.

[`supportsRaytracingFromRender`](/documentation/Metal/MTLDevice/supportsRaytracingFromRender)

A Boolean value that indicates whether you can call ray-tracing functions from a vertex or fragment shader.

[`supports32BitMSAA`](/documentation/Metal/MTLDevice/supports32BitMSAA)

A Boolean value that indicates whether the GPU can allocate 32-bit integer texture formats and resolve to 32-bit floating-point texture formats.

[`supportsPullModelInterpolation`](/documentation/Metal/MTLDevice/supportsPullModelInterpolation)

A Boolean value that indicates whether the GPU can compute multiple interpolations of a fragment function’s input.

[`supportsShaderBarycentricCoordinates`](/documentation/Metal/MTLDevice/supportsShaderBarycentricCoordinates)

A Boolean value that indicates whether the GPU supports barycentric coordinates.

[`supportsVertexAmplificationCount(_:)`](/documentation/Metal/MTLDevice/supportsVertexAmplificationCount(_:))

Returns a Boolean value that indicates whether the GPU supports an amplification factor.

[`areProgrammableSamplePositionsSupported`](/documentation/Metal/MTLDevice/areProgrammableSamplePositionsSupported)

A Boolean value that indicates whether the GPU supports programmable sample positions.

[`areRasterOrderGroupsSupported`](/documentation/Metal/MTLDevice/areRasterOrderGroupsSupported)

A Boolean value that indicates whether the GPU supports raster order groups.

[`areBarycentricCoordsSupported`](/documentation/Metal/MTLDevice/areBarycentricCoordsSupported)

A Boolean value that indicates whether the GPU supports barycentric coordinates.

### Checking texture and sampler support

[`supports32BitFloatFiltering`](/documentation/Metal/MTLDevice/supports32BitFloatFiltering)

A Boolean value that indicates whether the GPU can filter a texture with a 32-bit floating-point format.

[`supportsBCTextureCompression`](/documentation/Metal/MTLDevice/supportsBCTextureCompression)

A Boolean value that indicates whether you can use textures that use BC compression.

[`isDepth24Stencil8PixelFormatSupported`](/documentation/Metal/MTLDevice/isDepth24Stencil8PixelFormatSupported)

A Boolean value that indicates whether a device supports a packed depth-and-stencil pixel format.

[`supportsQueryTextureLOD`](/documentation/Metal/MTLDevice/supportsQueryTextureLOD)

A Boolean value that indicates whether you can query the texture level of detail from within a shader.

[`readWriteTextureSupport`](/documentation/Metal/MTLDevice/readWriteTextureSupport)

The GPU device’s texture support tier.

### Checking function pointer support

[`supportsFunctionPointers`](/documentation/Metal/MTLDevice/supportsFunctionPointers)

A Boolean value that indicates whether the device supports function pointers in compute kernel functions.

[`supportsFunctionPointersFromRender`](/documentation/Metal/MTLDevice/supportsFunctionPointersFromRender)

A Boolean value that indicates whether the device supports function pointers in render functions.

### Checking a GPU device’s memory

[`currentAllocatedSize`](/documentation/Metal/MTLDevice/currentAllocatedSize)

The total amount of memory, in bytes, the GPU device is using for all of its resources.

[`recommendedMaxWorkingSetSize`](/documentation/Metal/MTLDevice/recommendedMaxWorkingSetSize)

An approximation of how much memory, in bytes, this GPU device can allocate without affecting its runtime performance.

[`hasUnifiedMemory`](/documentation/Metal/MTLDevice/hasUnifiedMemory)

A Boolean value that indicates whether the GPU shares all of its memory with the CPU.

[`maxTransferRate`](/documentation/Metal/MTLDevice/maxTransferRate)

The highest theoretical rate, in bytes per second, the system can copy between system memory and the GPU’s dedicated memory (VRAM).

### Sampling a GPU device’s counters

[`counterSets`](/documentation/Metal/MTLDevice/counterSets)

The counter sets supported by the device object.

[`supportsCounterSampling(_:)`](/documentation/Metal/MTLDevice/supportsCounterSampling(_:))

Returns a Boolean value that indicates whether you can read GPU counters at the specified command boundary.

[`MTLCounterSamplingPoint`](/documentation/Metal/MTLCounterSamplingPoint)

Options for different times when you can sample GPU counters.

[`makeCounterSampleBuffer(descriptor:)`](/documentation/Metal/MTLDevice/makeCounterSampleBuffer(descriptor:))

Creates a counter sample buffer.

### Sampling GPU and CPU timestamps simultaneously

[`sampleTimestamps()`](/documentation/Metal/MTLDevice/sampleTimestamps())

Captures and returns a CPU timestamp and a GPU timestamp from the same moment in time.

[`sampleTimestamps:gpuTimestamp:`](/documentation/Metal/MTLDevice/sampleTimestamps:gpuTimestamp:)

Captures and returns a CPU timestamp and a GPU timestamp from the same moment in time.

### Identifying a GPU device

[`name`](/documentation/Metal/MTLDevice/name)

The full name of the GPU device.

[`architecture`](/documentation/Metal/MTLDevice/architecture)

The architectural details of the GPU device.

[`MTLArchitecture`](/documentation/Metal/MTLArchitecture)

A class that contains the architectural details of a GPU device.

[`registryID`](/documentation/Metal/MTLDevice/registryID)

The GPU device’s registry identifier.

[`location`](/documentation/Metal/MTLDevice/location)

The physical location of the GPU relative to the system.

[`MTLDeviceLocation`](/documentation/Metal/MTLDeviceLocation)

Indicates the location of the GPU relative to the system it’s connect to.

[`locationNumber`](/documentation/Metal/MTLDevice/locationNumber)

A specific GPU position based on its general location.

[`isLowPower`](/documentation/Metal/MTLDevice/isLowPower)

A Boolean value that indicates whether the GPU lowers its performance to conserve energy.

[`isRemovable`](/documentation/Metal/MTLDevice/isRemovable)

A Boolean value that indicates whether the GPU is removable.

[`isHeadless`](/documentation/Metal/MTLDevice/isHeadless)

A Boolean value that indicates whether a GPU device doesn’t have a connection to a display.

[`peerGroupID`](/documentation/Metal/MTLDevice/peerGroupID)

The peer group ID the GPU belongs to, if applicable.

[`peerCount`](/documentation/Metal/MTLDevice/peerCount)

The total number of GPUs in the peer group, if applicable.

[`peerIndex`](/documentation/Metal/MTLDevice/peerIndex)

The unique identifier for a GPU in a peer group.



---

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)