GetTensorC

Applicability

Product

Supported

Atlas 350 Accelerator Card

x

Atlas A3 training product/Atlas A3 inference product

Atlas A2 training product/Atlas A2 inference product

Atlas 200I/500 A2 inference product

x

Atlas inference product AI Core

x

Atlas inference product Vector Core

x

Atlas training product

x

Function Usage

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

Table 1 Template parameters

Parameter

Description

sync

Reserved parameter, which is imperceptible to users.

Table 2 API parameters

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

The GetTensorC API must be called after the Iterate API to complete the convolution backpropagation. The calling sequence is as follows:
1
2
3
while (Iterate()) {   
    GetTensorC(); 
}

Examples

1
2
3
while (gradInput_.Iterate()) {   
    gradInput_.GetTensorC(gradInputGm_[offsetC_]); 
}