Skip to content

GetCoreNumVector

功能说明

用于获取硬件平台独立的Vector Core的核数。

该接口仅在Atlas 推理系列产品有效,其他硬件平台型号均返回0。

函数原型

Text
uint32_t GetCoreNumVector(void) const

参数说明

返回值说明

返回硬件平台Vector Core的核数。

约束说明

Atlas 训练系列产品,不支持该接口,返回0

Atlas 推理系列产品,支持该接口,返回硬件平台Vector Core的核数

Atlas A2 训练系列产品/Atlas A2 推理系列产品不支持该接口,返回0

Atlas A3 训练系列产品/Atlas A3 推理系列产品不支持该接口,返回0

Atlas 200I/500 A2 推理产品不支持该接口,返回0

Ascend 950PR/Ascend 950DT不支持该接口,返回0

调用示例

Text
ge::graphStatus TilingXXX(gert::TilingContext* context) {
    auto ascendcPlatform = platform_ascendc::PlatformAscendC(context->GetPlatformInfo());
    auto aivCoreNum = ascendcPlatform.GetCoreNumAiv();
    auto vectorCoreNum = ascendcPlatform.GetCoreNumVector();
    auto allVecCoreNums = aivCoreNum + vectorCoreNum;
    // ...按照allVecCoreNums切分
    return ret;
}

免责声明:本站内容由 asc-devkit 仓 master 分支自动编译生成,属于持续开发版本,可能存在缺陷,仅供预览与参考。如需稳定及商用资料,请查阅官方 昇腾社区