triton.language.abs

triton.language.abs(x)

计算 x 的逐元素绝对值。

参数:

x (Block) – 输入值

此函数也可以作为成员函数在 tensor 上调用,即 x.abs() 而非 abs(x)