INFER_FORMAT_FUNC_REG

Description

Registers the InferFormat function of an operator.

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, GE uses the default inference function, which means that the output format is set to the input format.

Prototype

#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

Example and Related APIs

INFER_FORMAT_FUNC_REG(Transpose, TransposeInferFormat);