triton.language.squeeze
- triton.language.squeeze(x, dim: constexpr)
Removes a length-1 dimension from
xat indexdim.The selected dimension must have length 1 (checked at compile time). This is the inverse of
unsqueeze().- Parameters:
x – the input tensor
dim (int) – the index of the dimension to remove