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
The PlatformInfos pointer carries the internal hardware platform information. This information is used as input to PlatformAscendC, through which you can obtain hardware platform information via 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;
}
Parent topic: TilingContext