---
title: compute
framework: metal
role: symbol
role_heading: Type Property
path: metal/mtltensorusage/compute
---

# compute

A tensor context that applies to compute encoders.

## Declaration

```swift
static var compute: MTLTensorUsage { get }
```

## Discussion

Discussion You can use tensors with this context in MTL4ComputeCommandEncoder or MTLComputeCommandEncoder instances.
