Expand description
Tensor ops.
Structs§
Functions§
- Softmax with fused broadcast addition of a mask and scale. Equivalent to:
- Inplace equivalent of
attn_softmax_last_dim
- Scaled dot product attention with a fused kernel.
- Applies the softmax function to the input tensor, rescaling the element so that elements on a slice of fixed index on dimension
dim
are between 0 and 1 and sum to 1.