产品 |
是否支持 |
|---|---|
Ascend 950PR/Ascend 950DT |
√ |
√ |
|
√ |
|
x |
|
x |
|
x |
|
x |
设置当前AIV核的ID。分离架构下,一个AI Core由Cube Core(AIC)和Vector Core(AIV)按照一定比例1:N进行组合,其中N个AIV核的ID分别为0, 1, ..., N-1。
1 | __aicore__ inline void SetSubBlockIdx(uint8_t subBlockIdx) |
参数名 |
输入/输出 |
描述 |
|---|---|---|
subBlockIdx |
输入 |
当前AIV核的ID。 |
无
1 2 3 4 5 6 7 | typedef AscendC::MatmulType<AscendC::TPosition::GM, CubeFormat::ND, half> aType; typedef AscendC::MatmulType<AscendC::TPosition::GM, CubeFormat::ND, half> bType; typedef AscendC::MatmulType<AscendC::TPosition::GM, CubeFormat::ND, float> cType; typedef AscendC::MatmulType<AscendC::TPosition::GM, CubeFormat::ND, float> biasType; MatmulImpl<aType, bType, cType, biasType, CFG_NORM> mm; mm.SetSubBlockIdx(0); // 子核ID设置为0 |