vaddreluconv
Function
vaddreluconv instruction abstraction.
z = vaddreluconv(x, y), where x and y are added by element, the relu value is calculated, and the output is quantized.
The following cast types are supported: FP16->INT8, FP32->FP16, and INT16->INT8.
Prototype
1 | class vaddreluconv(x, y, z) |
Parameters
Parameter |
Input/Output |
Data Type |
Description |
|---|---|---|---|
x |
Input |
Tensor variable |
Input x-vector tensor. FP16, FP32, and INT16 are supported. |
y |
Input |
Tensor variable |
Input y-vector tensor. FP16, FP32, and INT16 are supported. |
z |
Output |
Tensor variable |
Output vector tensor. FP16 and INT8 are supported. |
Example
1 2 3 4 5 6 | from mskpp import vaddreluconv, 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 = vaddreluconv(ub_x, ub_y, ub_z)() |
Parent topic: Description of msKPP External APIs