triton.language.max¶
- triton.language.max(input, axis=None, return_indices=False, return_indices_tie_break_left=True, keep_dims=False)¶
返回沿指定
axis
方向上input
张量中所有元素的最大值- Parameters:
input (Tensor) – 输入值
axis (int) – 指定进行归约操作的维度。如果为None,则对所有维度进行归约
keep_dims (bool) - 如果为true,则保留长度为1的缩减维度
return_indices (bool) – 如果为true,返回对应最大值的索引
return_indices_tie_break_left (bool) - 如果为true,在出现平局的情况下(即多个元素具有相同的最大值),对于非NaN值返回最左边的索引
此函数也可以作为成员函数在
tensor
上调用, 使用x.max(...)
而不是max(x, ...)
。