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

# dimensions

The array of sizes, in elements, one for each dimension of this tensor.

## Declaration

```swift
var dimensions: MTLTensorExtents? { get }
```

## Discussion

Discussion For shader-bound tensors with dynamic extents, the rank of dimensions corresponds to the rank the shader function specifies, and extentAtDimensionIndex: always returns a value of -1.
