Function: get_op_name_len

C Prototype

aclError aclprofGetOpNameLen(const void *opInfo, size_t opInfoLen, uint32_t index, size_t *opNameLen)

Python Function

opNameLen, ret = acl.prof.get_op_name_len(opInfo, opInfoLen, index)

Function Usage

Obtains the string length of the operator name for memory allocation.

You are advised to create a thread and call this API in the new thread. Otherwise, this API call will block the main thread.

Input Description

opInfo: address of the operator information.

opInfoLen: length of the operator information.

index: operator index.

The value range is [0, Operator count – 1]. Call acl.prof.get_op_num to obtain the operator count.

Return Value

opNameLen: length of the opName memory allocation.

ret: int, error code.

Reference

For the API call example, see Profile Data Collection.