INFER_FORMAT_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 InferFormat function of an operator.

The GE issues a graph InferFormat call before and after shape and dtype inference, respectively. Between the two calls, the operator InferFormat function is called for each operator. If an operator has no corresponding registered InferFormat function, the GE uses the default inference function, which means that the output format is set to the input format.

Prototype

1
2
#define INFER_FORMAT_FUNC_REG(op_name, x) \
__INFER_FORMAT_FUNC_REG_IMPL__(op_name, INFER_FORMAT_FUNC(op_name, x), __COUNTER__)

Parameters

Parameter

Input/Output

Description

op_name

Input

Operator type.

x

Input

InferFormat function name (func_name) passed to IMPLEMT_INFERFORMAT_FUNC.

Returns

None

Restrictions

None

Call Examples and Related APIs

1
INFER_FORMAT_FUNC_REG(Transpose, TransposeInferFormat);