GetVecRegLen
Function Usage
Retrieves the vector unit bit width of the chip architecture on the current hardware platform.
Prototype
1 | uint32_t GetVecRegLen(void) const |
Parameters
None
Returns
- For the RegBase hardware platform chip architecture, the bit width of the vector unit on the current hardware platform is returned.
- For a non-RegBase hardware platform chip architecture, 0 is returned.
Restrictions
None
Examples
1 2 3 4 5 6 7 8 | void GetLayerNormMaxMinTmpSize(...) { platform_ascendc::PlatformAscendC* platform = platform_ascendc::PlatformAscendCManager::GetInstance(); ... const uint32_t vecLenB32 = platform->GetVecRegLen() / LAYERNORM_SIZEOF_FLOAT; const uint32_t vecLenB16 = platform->GetVecRegLen() / LAYERNORM_SIZEOF_HALF; ... } |
Parent topic: PlatformAscendC