aclopRegisterCompileFunc

Applicable Products

Product

Supported

Ascend 950PR/Ascend 950DT

×

Atlas A3 training products/Atlas A3 inference products

√

Atlas A2 training products/Atlas A2 inference products

√

Atlas 200I/500 A2 inference products

√

Atlas inference products

√

Atlas training products

√

Function Usage

Registers an operator selector for a dynamic-shape operator. The selection of the tiling policy depends on the operator's input shape.

An operator can register with only one operator selector. To change the operator selector, call aclopUnregisterCompileFunc to unregister and then call aclopRegisterCompileFunc to register again.

Prototype

1
aclError aclopRegisterCompileFunc(const char *opType, aclopCompileFunc func)

Parameters

Parameter

Input/Output

Description

opType

Input

Pointer to the operator type.

func

Input

Callback function of the operator selector.

typedef aclError (*aclopCompileFunc)(int numInputs, const aclTensorDesc *const inputDesc[], int numOutputs, const aclTensorDesc *const outputDesc[], const aclopAttr *opAttr, aclopKernelDesc *aclopKernelDesc);

Returns

0 on success; else, failure. For details, see aclError.