INFER_SHAPE
Function Usage
Runs the InferShape function of a specified operator to infer the output shape.
Prototype
INFER_SHAPE(KERNEL_NAME, op_args...)
Parameters
Constraints
- If the operator requires INFER_SHAPE, this macro must be called before ADD_TO_LAUNCHER_LIST_AICORE.
- The following APIs are called by the preceding macro definitions:
OP_INPUT(x...) OP_OUTPUT(x...) OP_ATTR(x...) OP_WORKSPACE(x...) OP_OUTSHAPE(x...) OP_OPTION(x...) OP_EMPTY_ARG OP_MODE(x...)
Examples
1 2 | // Call INFER_SHAPE to infer the input shape of the operator. BatchMatMulV3 is the operator name, OP_INPUT is the operator input parameter, OP_OUTPUT is the operator output parameter, and OP_ATTR is the operator attribute parameter. INFER_SHAPE(BatchMatMulV3, OP_INPUT(x1, x2, bias, nullptr), OP_OUTPUT(bmmOut), OP_ATTR(adjX1, adjX2, offsetX, opImplModeEnum)); |
Parent topic: Common Macros and Classes