文档
注册

GetCoreNumVector

函数功能

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

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

函数原型

uint32_t GetCoreNumVector(void) const;

参数说明

参数

输入/输出

说明

-

-

-

返回值说明

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

约束说明

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

Atlas 推理系列产品(Ascend 310P处理器),支持该接口,返回硬件平台Vector Core的核数

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

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

调用示例

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;
}
搜索结果
找到“0”个结果

当前产品无相关内容

未找到相关内容,请尝试其他搜索词