GetCoreNumAic

Function Usage

Obtains the number of cube cores on AI Cores of the current hardware platform. If the AI Core architecture is a cube/vector separated architecture, the number of cube cores on AI Cores is returned. If the architecture is not a separated architecture, the number of AI Cores is returned.

Prototype

uint32_t GetCoreNumAic(void) const;

Parameters

Parameter

Input/Output

Description

-

-

-

Returns

For the Atlas Training Series Product, the number of AI Cores is returned for the coupled architecture.

Constraints

None

Example

ge::graphStatus TilingXXX(gert::TilingContext* context) {
    auto ascendcPlatform = platform_ascendc::PlatformAscendC(context->GetPlatformInfo());
    auto aicNum = ascendcPlatform.GetCoreNumAic();
    auto aivNum = ascendcPlatform.GetCoreNumAiv();
    // ... Split by aivNum.
    context->SetBlockDim(ascendcPlatform.CalcTschBlockDim(aivNum, aicNum, aivNum));
    return ret;
}