<!--
{
  "availability" : [
    "iOS: 14.0.0 - 17.4.0",
    "iPadOS: 14.0.0 - 17.4.0",
    "macCatalyst: 14.0.0 - 17.4.0",
    "macOS: 11.0.0 - 14.3.0",
    "tvOS: 14.0.0 - 17.4.0"
  ],
  "documentType" : "symbol",
  "framework" : "MLCompute",
  "identifier" : "/documentation/MLCompute/MLCLayer/supportsDataType(_:on:)",
  "metadataVersion" : "0.1.0",
  "role" : "Type Method",
  "symbol" : {
    "kind" : "Type Method",
    "modules" : [
      "ML Compute"
    ],
    "preciseIdentifier" : "c:objc(cs)MLCLayer(cm)supportsDataType:onDevice:"
  },
  "title" : "supportsDataType(_:on:)"
}
-->

# supportsDataType(_:on:)

Returns a Boolean that indicates whether instances of this layer accept source tensors for the data type and device that you specify.

```
class func supportsDataType(_ dataType: MLCDataType, on device: MLCDevice) -> Bool
```

## Parameters

`dataType`

The data type of a possible input tensor to the layer.

`device`

The device to use to determine layer support.

## Return Value

`true` if the specified data type and device are supported.

## Discussion

---

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)