Function: get_model_id
Applicable Products
- Ascend 950PR&950DT products: 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
Obtains the ID of the model where a specified operator is located.
As a best practice, the user can create a thread and call this API in the new thread. Otherwise, this API call will block the main thread.
Prototype
-
C Prototype
size_t aclprofGetModelId(const void *opInfo, size_t opInfoLen, uint32_t index) -
Python Function
model_id = acl.prof.get_model_id(op_info, op_info_len, index)
Parameters
| Parameter | Description |
|---|---|
| op_info | Int, specified memory address. |
| op_info_len | Int, length of the operator information. |
| index | Int, operator index. The value range is [0, Operator count – 1]. Call acl.prof.get_op_num to obtain the operator count. |
Return Values
| Return Value | Description |
|---|---|
| model_id | Int, model ID. |