Function: get_op_name_v2
Applicability
Product |
Supported |
|---|---|
Atlas 350 Accelerator Card |
√ |
√ |
|
√ |
|
√ |
|
√ |
|
√ |
Description
Obtains the name of a specified operator.
You are advised to create a thread and call this API in the new thread. Otherwise, this API call will block the main thread.
acl.prof.get_op_name_v2 delivers the same function as acl.prof.get_op_name. However, the acl.prof.get_op_name_v2 API is used to obtain the length of the operator type and allocate the corresponding space. You do not need to pass arguments to specify the space required by the operator type. You are advised to use the acl.prof.get_op_name_v2 API first.
Prototype
- C Prototype
1aclError aclprofGetOpName(const void *opInfo, size_t opInfoLen, uint32_t index, char *opName, size_t opNameLen)
- Python Function
1op_name, ret = acl.prof.get_op_name_v2(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 Value
Return Value |
Description |
|---|---|
op_name |
Str, operator name. |
ret |
Int, error code.
|