vmulconv

Function

vmulconv instruction abstraction.

z = vmulconv(x, y), where x and y are multiplied by element, and the output is quantized.

Prototype

1
class vmulconv(x, y, z, dtype)

Parameters

Parameter

Input/Output

Data Type

Description

x

Input

Tensor variable

Input x-vector tensor. FP16 is supported.

y

Input

Tensor variable

Input y-vector tensor. FP16 is supported.

z

Output

Tensor variable

Output vector tensor.

dtype

Input

Tensor variable

  • Input data type, including UINT8 and INT8.
  • The output data type of z is determined by dtype.

Example

1
2
3
4
5
6
from mskpp import vmulconv, Tensor
ub_x, ub_y, ub_z = Tensor("UB"), Tensor("UB"), Tensor("UB")
gm_x, gm_y = Tensor("GM"), Tensor("GM")
ub_x.load(gm_x)
ub_y.load(gm_y)
out = vmulconv(ub_x, ub_y, ub_z, 'UINT8')()