aclopLoad
Description
Loads the single-operator model data from the memory. The memory is managed by the user. The "single-operator model data" refers to the data that is loaded to the memory from the single-operator .om file.
Restrictions
- The version of the operator library in the model file loading environment must be the same as that of the model file compilation environment. Otherwise, an error is reported during operator loading.
This constraint applies to the following scenarios:
- Dynamic-shape operator scenario
- Ascend virtual instance scenario
You can view the version field in the ${INSTALL_DIR} /opp/version.info file to view the operator library version.
Replace ${INSTALL_DIR} with the actual CANN component directory. If the Ascend-CANN-Toolkit package is installed as the root user, the CANN component directory is /usr/local/Ascend/ascend-toolkit/latest.
- Before loading, check whether the memory space is sufficient based on the size of the single-operator .om file. If the memory space is insufficient, the app will be abnormal.
Model
Maximum Number of Operators That Are Being Executed in a Process
Atlas 200/300/500 Inference Product In Ascend EP mode, the upper limit is 40000000.
2 million in Ascend RC form
Atlas Training Series Product 40000000
Prototype
aclError aclopLoad(const void *model, size_t modelSize)
Parameters
|
Parameter |
Input/Output |
Description |
|---|---|---|
|
model |
Input |
Pointer to the memory address of the single-operator model data. |
|
modelSize |
Input |
Size of the model data in the memory, in bytes. |
Returns
The value 0 indicates success, and other values indicate failure. For details, see aclError.