GetCoreNumVector

Function Usage

Obtains the number of independent vector cores on the hardware platform.

Prototype

uint32_t GetCoreNumVector(void) const;

Parameters

Parameter

Input/Output

Description

-

-

-

Returns

Number of vector cores on the hardware platform

Constraints

For the Atlas Training Series Product, this API is not supported and 0 is returned.

Example

ge::graphStatus TilingXXX(gert::TilingContext* context) {
    auto ascendcPlatform = platform_ascendc::PlatformAscendC(context->GetPlatformInfo());
    auto aivCoreNum = ascendcPlatform.GetCoreNumAiv();
    auto vectorCoreNum = ascendcPlatform.GetCoreNumVector();
    auto allVecCoreNums = aivCoreNum + vectorCoreNum;
    // ... Split by allVecCoreNums.
    return ret;
}