Creates a handle to an operator. This API is synchronous.
To destroy a handle, call aclopDestroyHandle.
If an operator has a constant input but aclSetTensorConst has not been called to set the constant input, call aclSetTensorPlaceMent to set the placement attribute of TensorDesc and set memType to the host memory.
aclError aclopCreateHandle(const char *opType,
int numInputs,
const aclTensorDesc *const inputDesc[],
int numOutputs,
const aclTensorDesc *const outputDesc[],
const aclopAttr *opAttr,
aclopHandle **handle);
Parameter |
Input/Output |
Description |
|---|---|---|
opType |
Input |
Pointer to the operator type name. |
numInputs |
Input |
Number of input tensors. |
inputDesc |
Input |
Pointer array of the input tensor description. |
numOutputs |
Input |
Number of output tensors. |
outputDesc |
Input |
Pointer array of the output tensor description. |
opAttr |
Input |
Pointer to the operator attributes. |
handle |
Output |
Pointer to the pointer to the aclopHandle data. |
0 on success; else, failure.