GetCoreNumAiv
Function Usage
Obtains the number of vector cores on AI Cores of the current hardware platform. If the AI Core architecture is a cube/vector separated architecture, the number of vector cores on AI Cores is returned. If the architecture is not a separated architecture, the number of AI Cores is returned.
Prototype
uint32_t GetCoreNumAiv(void) const;
Parameters
Parameter |
Input/Output |
Description |
|---|---|---|
- |
- |
- |
Returns
For the
Constraints
None
Example
ge::graphStatus TilingXXX(gert::TilingContext* context) {
auto ascendcPlatform = platform_ascendc::PlatformAscendC(context->GetPlatformInfo());
auto aicNum = ascendcPlatform.GetCoreNumAic();
auto aivNum = ascendcPlatform.GetCoreNumAiv();
// ... Split by aivNum.
context->SetBlockDim(ascendcPlatform.CalcTschBlockDim(aivNum, aicNum, aivNum));
return ret;
}
Parent topic: PlatformAscendC