ELMTWISE_INFER_SHAPEANDTYPE

Applicability

Product

Supported

Atlas 350 Accelerator Card

Atlas A3 training product/Atlas A3 inference product

Atlas A2 training product/Atlas A2 inference product

Atlas 200I/500 A2 inference product

Atlas inference product

Atlas training product

Header File

#include <graph/operator_reg.h>

Function Usage

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

For example, if the input shape is (1, 2, 3, 4) and input data type is float, the macro sets the output shape to (1, 2, 3, 4) and the output data type 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.

Restrictions

None

Examples

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