aclopExecWithHandle
Applicability
Product |
Supported |
|---|---|
√ |
|
√ |
|
√ |
|
√ |
|
√ |
Description
Calls an operator in handle mode. Dynamic-shape operators are not supported. To call dynamic-shape operators, use aclopExecuteV2 instead. This API is asynchronous.
Prototype
aclError aclopExecWithHandle(aclopHandle *handle, int numInputs, const aclDataBuffer *const inputs[], int numOutputs, aclDataBuffer *const outputs[], aclrtStream stream)
Parameters
Parameter |
Input/Output |
Description |
|---|---|---|
handle |
Input |
Pointer to the operator execution handle. Call aclopCreateHandle to create data of the aclopHandle type in advance. |
numInputs |
Input |
Number of input tensors. |
inputs |
Input |
Pointer array of the input tensors. Call aclCreateDataBuffer to create data of the aclDataBuffer type in advance. The array length is consistent with numInputs. |
numOutputs |
Input |
Number of output tensors. |
outputs |
Output |
Pointer array of the output tensors. Call aclCreateDataBuffer to create data of the aclDataBuffer type in advance. The array length is consistent with numOutputs. |
stream |
Input |
Target stream of the operator. |
Returns
0 on success; else, failure. For details, see aclError.
Restrictions
- In multi-thread scenarios, you cannot specify the same stream or use the default stream when calling this API. Otherwise, the task execution may be abnormal.
- If an operator with an unused optional input is executed, create data of the aclDataBuffer type by using the aclCreateDataBuffer(nullptr, 0) call, where aclDataBuffer does not need to be freed since it is a null pointer.