aclrtKernelArgsGetMemSize

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 actual memory size required by the parameter list during kernel launch.

Prototype

1
aclError aclrtKernelArgsGetMemSize(aclrtFuncHandle funcHandle, size_t userArgsSize, size_t *actualArgsSize)

Parameters

Parameter

Input/Output

Description

funcHandle

Input

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

userArgsSize

Input

Memory size required for storing the parameter list data, in bytes.

The memory size of each parameter data must be 8-byte aligned. userArgsSize is the sum of the memory sizes of all aligned parameter data.

actualArgsSize

Output

Actual memory size in bytes required by the parameter list during kernel launch.

Returns

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