aclmdlSetExecConfigOpt
Description
Sets the value of each attribute of the configuration object executed by the model.
Restrictions
- Call aclmdlCreateExecConfigHandle to create a configuration object for model execution.
- Call aclmdlSetExecConfigOpt for multiple times to set the value of each attribute in the configuration object.
- Call aclmdlExecuteV2 or aclmdlExecuteAsyncV2 to specify the configuration information required for model execution and execute the model.
- After the model is successfully executed, call the aclmdlDestroyExecConfigHandle API to destroy the model.
Prototype
aclError aclmdlSetExecConfigOpt(aclmdlExecConfigHandle *handle, aclmdlExecConfigAttr attr, const void *attrValue, size_t valueSize)
Parameters
Parameter |
Input/Output |
Description |
|---|---|---|
handle |
Output |
Pointer to the configuration object executed by the model. Call aclmdlCreateExecConfigHandle to create an object in advance. |
attr |
Input |
Attribute to set. |
attrValue |
Input |
Pointer to the attr value to set. If the attribute value itself is a pointer, pass the address of the pointer. |
valueSize |
Input |
Data length of attrValue. You can use the sizeof(*attrValue) function in the C/C++ standard library to query the data length. |
Returns
The value 0 indicates success, and other values indicate failure. For details, see aclError.