Skip to content
fn

sdpa_mask_layout

SdpaMask sdpa_mask_layout(const CpuStorage & mask, Dtype dt, int slice, int slices)

slice is Lq * Lk, slices the flattened leading extent.

Raises

DtypeMismatch
An additive mask whose dtype is not the scores' dt.
InvalidArgument
A mask holding neither one slice nor all of them.