SetQuit

Applicability

Product

Supported

Atlas 350 Accelerator Card

Atlas A3 training product / Atlas A3 inference product

x

Atlas A2 training product / Atlas A2 inference product

Atlas 200I/500 A2 inference product

x

Atlas inference product AI Core

x

Atlas inference product Vector Core

x

Atlas training product

x

Function Usage

Sends an exit message after the message space address is obtained using the AllocMessage API to notify the AIC corresponding to the message queue that messages in the queue do not need to be processed. As shown in the following figure, after the AIV corresponding to Queue 5 sends an exit message, Block 1 does not process any message in Queue 5.

Figure 1 Message queue exit

Prototype

1
__aicore__ inline void SetQuit(__gm__ CubeMsgType* msg)

Parameters

Table 1 API parameters

Parameter

Input/Output

Description

msg

Input

Message space address in the CubeResGroupHandle object.

Returns

None

Restrictions

None

Example

1
2
3
handle.AssignQueue(queIdx);  
auto msgPtr = a.AllocMessage();        // Obtain the message space pointer msgPtr.
handle.SetQuit(msgPtr);              // Send an exit message.