Function: get_op_name_v2
|
C Prototype |
aclError aclprofGetOpName(const void *opInfo, size_t opInfoLen, uint32_t index, char *opName, size_t opNameLen) |
|---|---|
|
Python Function |
op_name, ret = acl.prof.get_op_name_v2(op_info, op_info_len, index) |
|
Function Usage |
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. |
|
Input Description |
op_info: int, memory address of the operator information. op_info_len: int, length of the operator information. index: int, index of the operator whose name is to be obtained. The value range is [0, Operator count – 1]. Call acl.prof.get_op_num to obtain the operator count. |
|
Return Value |
op_name: str, operator name. ret: int, error code.
|
|
Reference |