vconv_deq

函数功能

vconv_deq指令抽象。

y = vconv_deq(x, dtype), vconv表示对输入数据进行量化操作的向量计算。

目前支持转换类型包括:FP16->INT8, INT32>FP16。

函数原型

class Vcondeq(x, y, dtype)

参数说明

参数名

输入/输出

数据类型

说明

x

输入

tensor变量

输入x向量tensor。

y

输出

tensor变量

输出y向量tensor。

dtype

输入

字符串

表示目标tensor的数据类型。

使用示例

ub_x, ub_y = Tensor("UB", "FP16"), Tensor("UB")
ub_x.load(gm_x)
out = vconv_deq(ub_x, ub_y, "FP32")()