vconv_deq
Function
vconv_deq instruction abstraction.
y = vconv_deq(x, dtype), where vconv_deq indicates vector calculation for quantization on input data.
Currently, the conversion from FP16 to INT8 and from INT32 to FP16 are supported.
Prototype
1 | class vconv_deq(x, y, dtype) |
Parameters
Parameter |
Input/Output |
Data Type |
Description |
|---|---|---|---|
x |
Input |
Tensor variable |
Input x-vector tensor. |
y |
Output |
Tensor variable |
Output y-vector tensor. |
dtype |
Input |
String |
Data type of the target tensor. |
Example
1 2 3 4 5 | from mskpp import vconv_deq, Tensor ub_x, ub_y = Tensor("UB", "FP16"), Tensor("UB") gm_x = Tensor("GM") ub_x.load(gm_x) out = vconv_deq(ub_x, ub_y, "FP32")() |
Parent topic: Description of msKPP External APIs