aclrtFunctionGetAvailDynUbufPerBlock

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

For a Single Instruction Multiple Thread (SIMT) kernel function, this API uses dynamicUbufSize to output the maximum dynamic Unified Buffer (UB) size that can be set before kernel launch.

For a non-SIMT kernel function, this API returns a success message and the value of dynamicUbufSize is fixed at 0.

Prototype

1
aclError aclrtFunctionGetAvailDynUbufPerBlock(void *func, uint32_t flags, size_t *dynamicUbufSize)

Parameters

Parameter

Input/Output

Description

func

Input

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

flags

Input

Reserved. The value is fixed at 0.

dynamicUbufSize

Output

Maximum dynamic Unified Buffer (UB) size available for each block, in bytes.

Returns

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