vabs

Function

vabs instruction abstraction.

y = vabs(x), where x and y take the absolute value by element.

Prototype

1
class vabs(x, y)

Parameters

Parameter

Input/Output

Data Type

Description

x

Input

Tensor variable

Input x-vector tensor. FP16 and FP32 are supported.

y

Output

Tensor variable

Output y-vector tensor. FP16 and FP32 are supported.

Example

from mskpp import vabs, Tensor
ub_x, ub_y = Tensor("UB"), Tensor("UB")
gm_x = Tensor("GM")
ub_x.load(gm_x)
out = vabs(ub_x, ub_y)()