ADD_TO_LAUNCHER_LIST_AICPU

Function Usage

Creates an execution task of an AI CPU operator and places the task in the aclOpExecutor execution queue. The task is executed when the second-phase API aclnnXxx is called.

Prototype

ADD_TO_LAUNCHER_LIST_AICPU(KERNEL_NAME, attrNames, opArgs...)

The following are associated APIs called by the preceding macro definitions:

OP_ATTR_NAMES

OP_INPUT(x...)

OP_OUTPUT(x...)

OP_ATTR(x...)

Parameters

Parameter

Input/Output

Description

KERNEL_NAME

Input

Operator name, for example, Add.

attrNames

Input

Operator attribute names. For details, see OP_ATTR_NAMES.

opArgs...

Input

Operator arguments.

Constraints

If the operator requires INFER_SHAPE, this macro must be called after INFER_SHAPE.

Example

1
2
// Call ADD_TO_LAUNCHER_LIST_AICPU to create an execution task for the IndexPut operator. IndexPut is the operator name, accumulate is the operator attribute name and parameter, selfRef, values, masks, and indices are the operator input parameters, and out is the operator output parameter.
ADD_TO_LAUNCHER_LIST_AICPU(IndexPut, OP_ATTR_NAMES({"accumulate"}), OP_INPUT(selfRef, values, masks, indices), OP_OUTPUT(out), OP_ATTR(accumulate));