triton.language.unsqueeze
- triton.language.unsqueeze(x, dim: constexpr)
Inserts a length-1 dimension into
xat indexdim.This is the inverse of
squeeze()and is equivalent toexpand_dims().- Parameters:
x – the input tensor
dim (int) – the index at which the new dimension is inserted