Function: get_op_type_len

Applicable Products

Product

Supported (√/x)

Ascend 950PR/Ascend 950DT

√

Atlas A3 training products/Atlas A3 inference products

√

Atlas A2 training products/Atlas A2 inference products

√

Atlas training products

√

Atlas inference products

√

Atlas 200I/500 A2 inference products

√

Description

Obtains the string length of the operator type 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.

Prototype

  • C Prototype
    1
    aclErroraclprofGetOpTypeLen(const void *opInfo, size_t opInfoLen, uint32_t index, size_t *opTypeLen)
    
  • Python Function
    1
    opTypeLen, ret = acl.prof.get_op_type_len(opInfo, opInfoLen, index)
    

Parameters

Parameter

Description

opInfo

Int, address of the operator information.

opInfoLen

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

opTypeLen

Int, length of operator type.

ret

Int, error code.