---
title: MTLTensor
framework: metal
role: symbol
role_heading: Protocol
path: metal/mtltensor
---

# MTLTensor

A resource representing a multi-dimensional array that you can use with machine learning workloads.

## Declaration

```swift
protocol MTLTensor : MTLResource
```

## Topics

### Instance Properties

- [auxiliaryPlanes](metal/mtltensor/auxiliaryplanes.md)
- [buffer](metal/mtltensor/buffer.md)
- [bufferOffset](metal/mtltensor/bufferoffset.md)
- [dataType](metal/mtltensor/datatype.md)
- [dimensions](metal/mtltensor/dimensions.md)
- [gpuResourceID](metal/mtltensor/gpuresourceid.md)
- [strides](metal/mtltensor/strides.md)
- [usage](metal/mtltensor/usage.md)

### Instance Methods

- [getBytes(_:strides:sliceOrigin:sliceDimensions:)](metal/mtltensor/getbytes(_:strides:sliceorigin:slicedimensions:).md)
- [getBytes(_:strides:sliceOrigin:sliceDimensions:plane:)](metal/mtltensor/getbytes(_:strides:sliceorigin:slicedimensions:plane:).md)
- [replace(sliceOrigin:sliceDimensions:plane:withBytes:strides:)](metal/mtltensor/replace(sliceorigin:slicedimensions:plane:withbytes:strides:).md)
- [replace(sliceOrigin:sliceDimensions:withBytes:strides:)](metal/mtltensor/replace(sliceorigin:slicedimensions:withbytes:strides:).md)

## Relationships

### Inherits From

- [MTLAllocation](metal/mtlallocation.md)
- [MTLResource](metal/mtlresource.md)
- [NSObjectProtocol](objectivec/nsobjectprotocol.md)

## See Also

### Tensors

- [MTLTensorDescriptor](metal/mtltensordescriptor.md)
- [MTLTensorExtents](metal/mtltensorextents.md)
- [MTLTensorReferenceType](metal/mtltensorreferencetype.md)
- [MTLTensorUsage](metal/mtltensorusage.md)
- [MTLTensorDomain](metal/mtltensordomain.md)
- [MTLTensorBinding](metal/mtltensorbinding.md)
- [MTLTensorError](metal/mtltensorerror-swift.struct.md)
- [MTLTensorError.Code](metal/mtltensorerror-swift.struct/code.md)
- [MTLTensorDataType](metal/mtltensordatatype.md)
- [MTLTensorDomain](metal/mtltensordomain.md)
- [MTL_TENSOR_MAX_RANK](metal/mtl_tensor_max_rank.md)
