两个tensor按元素相加。
vadd(lhs, rhs)
Atlas 200/300/500 推理产品:支持的数据类型有float16、float32、int32
Atlas 训练系列产品:支持的数据类型有float16、float32、int32、int64
Atlas 推理系列产品:支持的数据类型有float16、int16、float32、int32、int64、uint64
Atlas 200I/500 A2推理产品:支持的数据类型有float16、float32、int32、int64
Atlas A2训练系列产品:支持的数据类型有float16、float32、int32、int64、complex32、complex64
res_tensor:表示lhs + rhs,tvm.tensor类型
无。
Atlas 200/300/500 推理产品
Atlas 训练系列产品
Atlas 推理系列产品
Atlas 200I/500 A2推理产品
Atlas A2训练系列产品
from tbe import tvm from tbe import dsl shape = (1024,1024) input_dtype = "float16" data1 = tvm.placeholder(shape, name="data1", dtype=input_dtype) data2 = tvm.placeholder(shape, name="data2", dtype=input_dtype) res = dsl.vadd(data1, data2)