---
title: dimensions
framework: metal
role: symbol
role_heading: Instance Property
path: metal/mtltensordescriptor/dimensions
---

# dimensions

An array of sizes, in elements, one for each dimension of the tensors you create with this descriptor.

## Declaration

```swift
@NSCopying var dimensions: MTLTensorExtents { get set }
```

## Discussion

Discussion You are responsible for ensuring dimensions meets the following requirements: dimensions[i] must be greater than 0. If dataType is a format MTLTensorDataType, dimensions[0] must be a multiple of 32 elements. The default value of this property is a rank one extents with size one.
