GetAccVal (ISASI)
Function Usage
Obtains the computation result of ReduceSum (based on the first n pieces of tensor data).
Prototype
1 2 | template <typename T> __aicore__ inline T GetAccVal() |
Parameters
Parameter |
Description |
|---|---|
T |
Data type of the ReduceSum instruction. The value can be half or float. |
Returns
Computation result of ReduceSum (based on the first n pieces of tensor data).
Availability
Constraints
None
Example
1 2 3 4 5 | AscendC::LocalTensor<float> src; AscendC::LocalTensor<float> work; AscendC::LocalTensor<float> dst; AscendC::ReduceSum(dst, src, work, 128); float res = AscendC::GetAccVal<float>(); |
Parent topic: Reduction Instructions