GetTensorC
Applicability
Product |
Supported |
|---|---|
√ |
|
√ |
|
x |
|
x |
|
x |
|
x |
Function
After the Iterate operation is complete, this API is called to obtain the result matrix block and transfer data from the L0C to the GM. This API is used together with the Iterate API to obtain the result matrix after the Iterate operation is complete.
Prototype
1 2 | template <bool sync = true> __aicore__ inline void GetTensorC(const AscendC::GlobalTensor<DstT> &output, uint8_t enAtomic = 0, bool enSequentialWrite = false) |
Parameters
Parameter |
Description |
|---|---|
sync |
Reserved parameter, which is imperceptible to users. |
Parameter |
Input/Output |
Description |
|---|---|---|
output |
Input |
Moves the computation result to the GM address of the global memory. |
enAtomic |
Input |
Reserved parameter, which is imperceptible to users. |
enSequentialWrite |
Input |
Reserved parameter, which is imperceptible to users. |
Returns
None
Restrictions
1 2 3 | while (Iterate()) { GetTensorC(); } |
Example
1 2 3 | while (gradInput_.Iterate()) { gradInput_.GetTensorC(gradInputGm_[offsetC_]); } |