文档首页> Atlas 500应用> TE API参考> compute接口> te.lang.cce.vand(lhs, rhs)
更新时间:2021-03-18 GMT+08:00
分享

te.lang.cce.vand(lhs, rhs)

两个tensor元素按位取与,元素的数据类型需要一致,支持的类型:int16,uint16。

该接口在elewise_compute.py中定义。

参数说明

  • lhs:左tensor,tvm.tensor类型。
  • rhs:右tensor,tvm.tensor类型。

返回值

res_tensor:表示lhs按位与rhs,tvm.tensor类型

调用示例

shape = (1024,1024)
input_dtype = "int16"
data1 = tvm.placeholder(shape, name="data1", dtype=input_dtype)
data2 = tvm.placeholder(shape, name="data2", dtype=input_dtype)
res = te.lang.cce.vand(data1, data2)
分享:

    相关文档

    相关产品