Function: get_desc_from_mem
Applicability
Product |
Supported (√/x) |
|---|---|
√ |
|
√ |
|
√ |
|
√ |
|
√ |
Function Usage
Obtains model description from memory.
Prototype
- C Prototype
1aclError aclmdlGetDescFromMem(aclmdlDesc *modelDesc, const void *model, size_t modelSize)
- Python Function
1ret = acl.mdl.get_desc_from_mem(model_desc, model, model_size)
Parameter Description
Parameter |
Description |
|---|---|
model |
Int, pointer address of the memory for storing model data. Allocate memory on the host or device based on where the application runs. For details about the memory allocation APIs, see Memory Management. |
model_size |
Int, size of the model data in the memory, in bytes. |
model_desc |
Int, pointer to data of the aclmdlDesc type. You need to call the create_desc API to create data of the aclmdlDesc type in advance. After the call is successful, the content in the pointer address is updated. |
Return Value Description
Return Value |
Description |
|---|---|
ret |
Int, 0 on success; else, failure. |
Restrictions
The model description obtained using this API cannot be used for the get_op_attr and get_cur_output_dims APIs.