aclmdlRICondHandleCreate

Note: This API is for trial use and may be changed in later versions. It is not available in production environments.

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

Creates a condition handle.

Prototype

aclError aclmdlRICondHandleCreate(aclmdlRI modelRI, uint32_t defaultLaunchValue, aclmdlRICondHandleFlag flag, aclmdlRICondHandle *handle)

Parameters

Parameter

Input/Output

Description

modelRI

Input

Model running instance used to create a condition handle. For details about the type definition, see aclmdlRI.

defaultLaunchValue

Input

Initial value of a condition variable.

flag

Input

Condition handle flag. For details about the type definition, see aclmdlRICondHandleFlag.

Only the following values are supported currently:

  • ACL_MODEL_RI_COND_HANDLE_ASSIGN_DEFAULT: The condition variable is initialized to the value of the defaultLaunchValue parameter before each model execution.
  • 0: The condition variable is not initialized to the value of defaultLaunchValue before model execution. The value of the condition variable is managed by the user. In this case, call aclmdlRICondHandleGetCondPtr to obtain the pointer to the device memory address that stores the value of the condition variable and then write the condition variable value to that device memory.

handle

Output

Condition handle. For details about the type definition, see aclmdlRICondHandle.

Returns

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