获取当前硬件平台Cube Core的核数。
uint32_t GetCoreNumAic(void) const;
参数 |
输入/输出 |
说明 |
|---|---|---|
- |
- |
- |
Cube Core的核数。
无
ge::graphStatus TilingXXX(gert::TilingContext* context) {
auto ascendcPlatform = platform_ascendc::PlatformAscendC(context->GetPlatformInfo());
auto aicNum = ascendcPlatform.GetCoreNumAic();
auto aivNum = ascendcPlatform.GetCoreNumAiv();
// ...按照aivNum切分
context->SetBlockDim(ascendcPlatform.CalcTschBlockDim(aivNum, aicNum, aivNum));
return ret;
}