vaddrelu

Description

Computes ReLU on the element-wise sum of tensor_1 and tensor_0: relu(tensor_0 + tensor_1).

Prototype

vaddrelu(lhs, rhs)

Parameters

  • lhs: a tvm.tensor for the input
  • rhs: a tvm.tensor for the input
  • The input tensors must have the same data type.

    Atlas training product: supports float16.

    Atlas inference product: supports float16, float32, and int16.

    Atlas 200/300/500 inference product: supports float16.

    SoC: supports float16.

Returns

res_tensor: a tvm.tensor for the result tensor

Restrictions

None

Applicability

Atlas training product

Atlas inference product

Atlas 200I/500 A2 inference product

Atlas A2 training product/Atlas A2 inference product

Atlas A3 training product/Atlas A3 inference product

Example

from tbe import tvm
from tbe import dsl
shape = (1024,1024)
input_dtype = "float16"
data = tvm.placeholder(shape, name="data", dtype=input_dtype)
data1 = tvm.placeholder(shape, name="data1", dtype=input_dtype)
res = dsl.vaddrelu(data, data1)