GetPlatformInfo

Function Usage

Obtains the PlatFormInfos pointer. The PlatformInfos class is used to manage and query hardware platform information, including the number of cores and memory bandwidth.

Prototype

fe::PlatFormInfos *GetPlatformInfo() const

Parameters

None

Returns

PlatformInfos pointer contains internal hardware platform information, which is used as the input of PlatformAscendC. Developers can obtain the hardware platform information using the methods provided by PlatformAscendC.

Constraints

None

Examples

ge::graphStatus TilingXXX(gert::TilingContext* context) {
    auto ascendcPlatform = platform_ascendc::PlatformAscendC(context->GetPlatformInfo());
    auto coreNum = ascendcPlatform.GetCoreNum();
    // ... Design the tiling policy based on the number of cores.
    context->SetBlockDim(coreNum);
    return ret;
}