---
title: maskTensor
framework: metalperformanceshadersgraph
role: symbol
role_heading: Instance Property
path: metalperformanceshadersgraph/mpsgraphsdpadescriptor/masktensor
---

# maskTensor

An optional additive mask tensor applied to the scaled QK^T scores before softmax. Must be broadcast-compatible with shape [batch, heads, T_q, T_kv]. Mutually exclusive with isCausal.

## Declaration

```swift
var maskTensor: MPSGraphTensor? { get set }
```
