GetHcclContext

Applicability

Product

Supported

Atlas A3 training products/Atlas A3 inference products

Atlas A2 training products/Atlas A2 inference products

Atlas 200I/500 A2 inference products

x

Atlas inference product's AI Core

Atlas inference product's Vector Core

Atlas training products

x

Function

Obtains the context (message area) address of a communicator with the specified index.

Prototype

1
2
template <uint32_t index>
__aicore__ inline __gm__ uint8_t* __gm__ GetHcclContext(void)

Parameters

Table 1 Template parameters

Parameter

Description

index

A template parameter, which indicates the communicator ID to be set. Currently, only two communicators are supported. index can be 0 or 1.

Returns

Returns the context (message area) address of a specified communicator.

Restrictions

Currently, a maximum of two communicators are supported.

Example

1
GM_ADDR contextGM = AscendC::GetHcclContext<0>();