ELMTWISE_INFER_SHAPEANDTYPE

Applicability

Product

Supported or Not

Atlas A3 training products/Atlas A3 inference products

Atlas A2 training products/Atlas A2 inference products

Atlas 200I/500 A2 inference products

Atlas inference products

Atlas training products

Header File

#include <graph/operator_reg.h>

Function Usage

Encapsulates the macro of common functions, facilitating the development of the InferShape function. This API sets the output shape and dtype based on the input shape and dtype.

For example, if the input shape is (1, 2, 3, 4) and input dtype is float, the macro sets the output shape to (1, 2, 3, 4) and the output dtype to float.

Prototype

1
ELMTWISE_INFER_SHAPEANDTYPE(in_name, out_name)

Parameters

Parameter

Input/Output

Description

in_name

Input

Operator input.

out_name

Input

Operator output.

Returns

Success or failure.

Constraints

None

Examples

1
COMMON_INFER_FUNC_REG(DiagD, ELMTWISE_INFER_SHAPEANDTYPE("assist", "y"));