aclmdlConfigAttr

typedef enum {
    ACL_MDL_PRIORITY_INT32 = 0,    //(Optional) Model execution priority. A smaller value indicates a higher priority. The value range is [0,7]. The default value is 0.For the Ascend 910 AI Processor, the enumerated values do not take effect when CANN is installed in the Docker container and the computing power is grouped.
    ACL_MDL_LOAD_TYPE_SIZET,        //(Required) Model loading mode. For details, see the following description.
    ACL_MDL_PATH_PTR,              //(Required if the model is loaded from a file) Pointer to the path of the offline model file.
    ACL_MDL_MEM_ADDR_PTR,       //(Required if the model is loaded from memory) Start address of the model in the memory.
    ACL_MDL_MEM_SIZET,            //(Required if the model is loaded from memory) Size of the model in the memory. Must be used in conjunction with ACL_MDL_MEM_ADDR_PTR.
    ACL_MDL_WEIGHT_ADDR_PTR,       //(Required if the weight memory is managed by the user) Pointer to the weight memory on the device. If this parameter is not set, the system manages the memory.
    ACL_MDL_WEIGHT_SIZET,          //(Required if the weight memory is managed by the user) Size of the weight memory on the device, in bytes. If this parameter is not set, the system manages the memory. Must be used in conjunction with ACL_MDL_WEIGHT_ADDR_PTR.
    ACL_MDL_WORKSPACE_ADDR_PTR,    //(Required if the workspace is managed by the user) Pointer to the workspace on the device. If this parameter is not set, the system manages the memory.
    ACL_MDL_WORKSPACE_SIZET,      //(Required if the workspace is managed by the user) Size of the workspace on the device, in bytes. If this parameter is not set, the system manages the memory. Must be used in conjunction with ACL_MDL_WORKSPACE_ADDR_PTR.
    ACL_MDL_INPUTQ_NUM_SIZET,      //(Required if the model is loaded by using a queue) Size of the model input queue. Must be used in conjunction with ACL_MDL_INPUTQ_ADDR_PTR. The current version does not support this parameter.
    ACL_MDL_INPUTQ_ADDR_PTR,       //(Required if the model is loaded by using a queue) Pointer to the model input queue ID. The current version does not support this parameter.
    ACL_MDL_OUTPUTQ_NUM_SIZET,      //(Required if the model is loaded by using a queue) Size of the model output queue. Must be used in conjunction with ACL_MDL_OUTPUTQ_ADDR_PTR. The current version does not support this parameter.
    ACL_MDL_OUTPUTQ_ADDR_PTR       //(Required if the model is loaded by using a queue) Pointer to the model output queue ID. The current version does not support this parameter.
} aclmdlConfigAttr;

ACL_MDL_LOAD_TYPE_SIZET (model loading mode) supports the following macros:

For details about how to obtain the .om file, see Building a Model.

When you use ATC to generate an OM file whose size is limited, set --external_weight to 1, indicating that the weight of the Const/Constant node on the original network is saved in a separate file in the weight directory. Ensure that the weight directory is at the same level as the OM file so that AscendCL can automatically search for the weight file in the weight directory when you call this API to load the OM file. Otherwise, the weight file may fail to be loaded.