对tensor中的每个元素做线性整流运算relu。
您可以在“te/lang/cce/te_compute/elewise_compute.py”查看接口定义。
Atlas 200/300/500 推理产品:支持的数据类型有float16
Atlas 训练系列产品:支持的数据类型有float16
te.lang.cce.vrelu(raw_tensor)
raw_tensor:输入tensor,tvm.tensor类型。
res_tensor:表示relu(raw_tensor),tvm.tensor类型。
Atlas 200/300/500 推理产品
Atlas 训练系列产品
shape = (1024,1024) input_dtype = "float16" data = tvm.placeholder(shape, name="data", dtype=input_dtype) res = te.lang.cce.vrelu(data)