GetAccVal (ISASI)
Applicability
Product |
Supported/Unsupported |
|---|---|
√ |
|
√ |
|
x |
|
x |
|
x |
|
x |
Function Usage
Obtains the computation result of the ReduceSum API (the API for computing the first n pieces of data in a tensor, where n is the count parameter of the API).
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 the ReduceSum API (the API for computing the first n data elements of a tensor, where n is the count parameter of this API).
Constraints
None
Examples
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 computation