aclmdlExecuteAsyncV2
Applicability
|
Product |
Supported |
|---|---|
|
Atlas 350 Accelerator Card |
× |
|
|
× |
|
|
× |
|
|
× |
|
|
× |
|
|
× |
Function Usage
Performs model inference based on the attributes configured by the aclmdlSetExecConfigOpt API until the inference result is returned. This API is enhanced based on aclmdlExecuteAsync. It allows you to control configuration parameters during model inference. This API is asynchronous.
- Call aclmdlCreateExecConfigHandle to create a configuration object for model execution.
- Call aclmdlSetExecConfigOpt multiple times to set the value of each attribute in the configuration object.
- Call aclmdlExecuteAsyncV2 to specify the configuration information required for model execution and execute the model.
- After the model is successfully loaded, call aclmdlDestroyExecConfigHandle to destroy the configuration object.
Prototype
1
|
aclError aclmdlExecuteAsyncV2(uint32_t modelId, const aclmdlDataset *input, aclmdlDataset *output, aclrtStream stream, const aclmdlExecConfigHandle *handle) |
Parameters
|
Parameter |
Input/Output |
Description |
|---|---|---|
|
modelId |
Input |
Model ID for inference. A successful aclmdlLoadFromFile, aclmdlLoadFromMem, aclmdlLoadFromFileWithMem, or aclmdlLoadFromMemWithMem call returns a model ID. |
|
input |
Input |
Pointer to the input data for model inference. For details about the type definition, see aclmdlDataset. |
|
output |
Output |
Pointer to the output data for model inference. For details about the type definition, see aclmdlDataset. |
|
stream |
Input |
Stream. For details about the type definition, see aclrtStream. |
|
handle |
Input |
Pointer to the configuration object executed by the model. For details about the type definition, see aclmdlExecConfigHandle. The value must be the same as that of handle in aclmdlSetExecConfigOpt. |
Returns
0 on success; else, failure. For details, see aclError.
Restrictions
The restrictions are the same as those of aclmdlExecuteAsync.