GetCoreNumVector

Function Usage

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

This API is valid only on the Atlas inference product. For other hardware platforms, it returns 0.

Prototype

1
uint32_t GetCoreNumVector(void) const

Parameters

None

Returns

Number of vector cores on the hardware platform

Constraints

For the Atlas training product, this API is not supported and 0 is returned.

For the Atlas inference product, this API is supported and the number of vector cores on the hardware platform is returned.

For the Atlas A2 training product/Atlas A2 inference product, this API is not supported and 0 is returned.

For the Atlas A2 training product/Atlas A2 inference product, this API is not supported and 0 is returned.

For the Atlas A2 training products/Atlas A2 inference products, this API is not supported and 0 is returned.

For the Atlas A2 training products/Atlas A2 inference products, this API is not supported and 0 is returned.

Examples

1
2
3
4
5
6
7
8
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;
}