aclrtGetFunctionSize

Applicable Products

Product

Supported

Ascend 950PR/Ascend 950DT

√

Atlas A3 training products/Atlas A3 inference products

√

Atlas A2 training products/Atlas A2 inference products

√

Atlas 200I/500 A2 inference products

☓

Atlas inference products

√

Atlas training products

☓

Function

Obtains the size of a kernel code segment based on the kernel function handle.

Prototype

1
aclError aclrtGetFunctionSize(aclrtFuncHandle funcHandle, size_t *aicSize, size_t *aivSize)

Parameters

Parameter

Input/Output

Description

funcHandle

Input

Kernel function handle. For details about the type definition, see aclrtFuncHandle.

aicSize

Output

Size of the code segment for executing an operator on AI Core or Cube Core, in bytes.

If an operator is executed only on Vector Core, the value is 0.

aivSize

Output

Size of the code segment for executing an operator on Vector Core, in bytes.

If an operator is executed only on AI Core or Cube Core, the value is 0.

Returns

0 on success; otherwise, failure. For details, see aclError.