COMMON_INFER_FUNC_REG

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

Registers the InferShape function of an operator.

Different from INFER_FUNC_REG, the argument of the InferShape function registered by this function is of the base class instead of the subclass of Operator. This API allows the InferShape function to be reused across operators.

Prototype

1
COMMON_INFER_FUNC_REG(op_name, x)

This API call automatically issues a COMMON_INFER_VERIFY_FUNC(x) call, in which x indicates the pointer to x passed to the COMMON_INFER_FUNC_REG(op_name, x) call.

Parameters

Parameter

Input/Output

Description

op_name

Input

Operator type.

x

Input

InferShape function name, which must be the same as the InferShape function name passed to IMPLEMT_COMMON_INFERFUNC.

Returns

None

Restrictions

None