---
title: "supportsDataType(_:on:)"
framework: ML Compute
role: symbol
role_heading: Type Method
platforms: [iOS 14.0+, iPadOS 14.0+, Mac Catalyst 14.0+, macOS 11.0+, tvOS 14.0+]
path: "mlcompute/mlclayer/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.

## Declaration

```swift
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

Return Value true if the specified data type and device are supported.

## See Also

### Inspecting a Layer

- [layerID](mlcompute/mlclayer/layerid.md)
- [label](mlcompute/mlclayer/label.md)
- [isDebuggingEnabled](mlcompute/mlclayer/isdebuggingenabled.md)
- [deviceType](mlcompute/mlclayer/devicetype.md)
