SetQuit

Product Support

Product

Supported

Atlas A3 training products / Atlas A3 inference products

x

Atlas A2 training products / Atlas A2 inference products

Atlas 200I/500 A2 inference products

x

Atlas inference product 's AI Core

x

Atlas inference product 's Vector Core

x

Atlas training products

x

Function

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.