GetTensorC

Applicability

Product

Supported

Atlas A3 training products/Atlas A3 inference products

Atlas A2 training products/Atlas A2 inference products

Atlas 200I/500 A2 inference products

x

Atlas inference product's AI Core

x

Atlas inference product's Vector Core

x

Atlas training products

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

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(); 
}

Example

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