更新时间:2021-03-18 GMT+08:00
分享

te.lang.cce.vrec(raw_tensor)

对tensor中的每个元素做倒数运算 1 / x,支持的类型:float16,float32。int8,uint8,int32类型会被转换为float16。

该接口在elewise_compute.py中定义。

参数说明

raw_tensor:输入tensor,tvm.tensor类型。

返回值

res_tensor:表示1 / raw_tensor,tvm.tensor类型。

调用示例

shape = (1024,1024)
input_dtype = "float16"
data = tvm.placeholder(shape, name="data", dtype=input_dtype)
res = te.lang.cce.vrec(data)
分享:

    相关文档

    相关产品