Function: load

Applicable Products

  • Ascend 950PR&950DT products: Not supported
  • Atlas A3 products: Supported
  • Atlas A2 products: Supported
  • Atlas 200I/500 A2 inference products: Supported
  • Atlas inference products: Supported
  • Atlas training products: Supported

Function

Loads the single-operator model data from the memory. The memory is managed by the user.

Prototype

  • C Prototype

    aclError aclopLoad(const void *model, size_t modelSize)
    
  • Python Function

    ret = acl.op.load(model, model_size)
    

Parameters

Parameter Description
model Int, address object of the single-operator model data.
model_size Int, length of the model data in the memory, in bytes.

Return Values

Return Value Description
ret Int, error code: 0 on success; else, failure.

Constraints

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 application will be abnormal. The maximum number of operators being executed in a process varies depending on the product model.

  • For Ascend 950PR&950DT, Atlas A3, and Atlas A2 products, the maximum number is 2,000,000.
  • For Atlas 200I/500 A2 inference products and Atlas training products, the maximum number is 40,000,000.
  • For Atlas inference products, the upper limit is 40,000,000 in Ascend EP form and 2,000,000 in open Ctrl CPU from.

Reference

For details about the API calling process, see Single-Operator Calling.