aclopExecute (Deprecated)
Note: This API will be deprecated in future releases. Use aclopExecuteV2 instead.
Applicability
|
Product |
Supported |
|---|---|
|
Atlas 350 Accelerator Card |
√ |
|
|
√ |
|
|
√ |
|
|
√ |
|
|
√ |
|
|
√ |
Function Usage
Executes a specified operator. This API is asynchronous.
The inputs, outputs, and attributes of operators are different from each other. This API searches for the corresponding task based on the optype, input tensor description, output tensor description, and attributes, and delivers the task for execution. Therefore, you need to organize operators in strict accordance with their inputs, outputs, and attributes when calling this API.
Prototype
1 2 3 4 5 6 7 8 9 |
aclError aclopExecute(const char *opType, int numInputs, const aclTensorDesc *const inputDesc[], const aclDataBuffer *const inputs[], int numOutputs, const aclTensorDesc *const outputDesc[], aclDataBuffer *const outputs[], const aclopAttr *attr, aclrtStream stream) |
Parameters
|
Parameter |
Input/Output |
Description |
|---|---|---|
|
opType |
Input |
Pointer to the operator type name. |
|
numInputs |
Input |
Number of input tensors. |
|
inputDesc |
Input |
Pointer array of the operator input tensor description. For details about the type definition, see aclTensorDesc. Call aclCreateTensorDesc to create data of the aclTensorDesc type in advance. The array length must be consistent with numInputs. The elements in the inputs array must match those in the inputDesc array with ordering preserved. |
|
inputs |
Input |
Pointer array of the operator input tensor. For details about the type definition, see aclDataBuffer. Call aclCreateDataBuffer to create data of the aclDataBuffer type in advance. The array length must be consistent with numInputs. The elements in the inputs array must match those in the inputDesc array with ordering preserved. |
|
numOutputs |
Input |
Number of output tensors. The array length must be consistent with numOutputs. |
|
outputDesc |
Input |
Pointer array of the operator output tensor description. For details about the type definition, see aclTensorDesc. Call aclCreateTensorDesc to create data of the aclTensorDesc type in advance. The array length must be consistent with numOutputs. The elements in the outputs array must match those in the outputDesc array with ordering preserved. |
|
outputs |
Output |
Pointer array of the operator output tensor. For details about the type definition, see aclDataBuffer. Call aclCreateDataBuffer to create data of the aclDataBuffer type in advance. The array length must be consistent with numOutputs. The elements in the outputs array must match those in the outputDesc array with ordering preserved. |
|
attr |
Input |
Pointer to the operator attributes. For details about the type definition, see aclopAttr. Call aclopCreateAttr to create data of the aclopAttr type in advance. |
|
stream |
Input |
Target stream of the operator. For details about the type definition, see aclrtStream. |
Returns
0 on success; else, failure. For details, see aclError.
Restrictions
In multi-thread scenarios, this API cannot be called to specify the same stream or the default stream. Otherwise, exceptions may occur in task execution.