Obtains the core number of the current hardware platform. If the AI Core architecture is a cube/vector decoupled architecture, the number of vector cores on AI Cores is returned. If the architecture is not a decoupled architecture, the number of AI Cores is returned.
If the AI Core architecture is a cube/vector decoupled architecture, the number of vector cores on AI Cores is returned. If the architecture is not a decoupled architecture, the number of AI Cores is returned.
Currently, the processors with decoupled architecture include Kirin 9020 and Kirin 9030 series processors.
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;
}