产品 |
是否支持 |
|---|---|
Ascend 950PR/Ascend 950DT |
√ |
√ |
|
√ |
|
√ |
|
√ |
|
x |
|
√ |
清空原子操作的状态。
1 | __aicore__ inline void DisableDmaAtomic() |
无
无
无
1 2 3 4 5 6 | constexpr uint32_t totalLength = 256; // 参与搬运的元素个数 AscendC::LocalTensor<float> src0Local; AscendC::GlobalTensor<float> dstGlobal; AscendC::SetAtomicAdd<float>(); // 开启原子累加,累加数据类型为float AscendC::DataCopy(dstGlobal, src0Local, totalLength * sizeof(float)); AscendC::DisableDmaAtomic(); // 清空原子操作的状态 |