目录

GetSocVersion

Function Description

Obtain the version of the current hardware platform.

Function Prototype

SocVersion GetSocVersion(void) const;

Parameters

None

Return Value

Enumeration class of the current hardware platform version. For details about the mapping between the enumeration class and AI Processor models, see the ddk/ai_ddk_lib/include/tiling/platform/platform_ascendc.h header file in the CANN DDK package.

Restrictions

None

Calling Example

ge::graphStatus TilingXXX(gert::TilingContext* context) {
    auto ascendcPlatform = platform_ascendc::PlatformAscendC(context->GetPlatformInfo());
    auto socVersion = ascendcPlatform.GetSocVersion();
    // Design the tiling policy based on the obtained version and model.
    if (socVersion == platform_ascendc::SocVersion::KIRIN9020) {
        // ...
    }
    return ret;
}