tilus.Script.abs¶
- Script.abs(x, *, out=None)[source]¶
Compute the absolute value of a register tensor.
This instruction computes the absolute value of each element in the register tensor x. The result is a new register tensor with the same dtype, shape, and layout as x.
- Parameters:
x (RegisterTensor) – The register tensor to compute the absolute value of.
out (RegisterTensor, optional) – The register tensor to store the result. If not provided, a new register tensor will be allocated.
- Returns:
ret – The register tensor containing the absolute values of the elements in x. The shape and dtype of the output tensor will be the same as that of x.
- Return type: