triton.language.abs

triton.language.abs(x, _semantic=None)

计算 x 的按元素绝对值。

参数:

x (Block) – 输入值

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