GetCurNpuArch
Function Usage
Obtains the chip architecture version number of the current hardware platform.
Prototype
1 | NpuArch GetCurNpuArch(void) const |
Parameters
None
Returns
Enumeration class of the architecture version number of the current hardware platform. For details about the mapping between the enumeration class and AI Processor models, see the include/platform/soc_spec.h header file in CANN component directory.
Product |
NPU_ARCH |
|---|---|
Atlas 350 Accelerator Card |
DAV_3510 |
DAV_2201 |
|
DAV_2201 |
|
DAV_3002 |
|
DAV_2002 |
|
DAV_2002 |
|
DAV_1001 |
Restrictions
None
Examples
1 2 3 4 5 6 7 8 9 10 | ge::graphStatus TilingXXX(gert::TilingContext* context) { auto ascendcPlatform = platform_ascendc::PlatformAscendC(context->GetPlatformInfo()); auto npuArch = ascendcPlatform.GetCurNpuArch(); // ... Design the tiling policy based on the obtained version. // Replace DAV_XXX with the actual architecture version number. if (socVersion == NpuArch::DAV_XXXX) { // ... } return ret; } |
Parent topic: PlatformAscendC