SetFixPipeAddr
Applicability
Product |
Supported |
|---|---|
Atlas 350 Accelerator Card |
x |
x |
|
x |
|
√ |
|
x |
|
x |
|
x |
Function Usage
Sets the address of the LocalTensor for the element-wise operation after real-time quantization during DataCopy (CO1 -> GM).
Prototype
1 2 | template <typename T> __aicore__ inline void SetFixPipeAddr(const LocalTensor<T>& eleWiseData, uint16_t c0ChStride) |
Parameters
Parameter |
Input/Output |
Description |
|---|---|---|
eleWiseData |
Input |
Number of source operands on L1 Buffer. The type is LocalTensor. Its TPosition can be A1, B1, or C1. The start address must be 32-byte aligned, and only the half data type is supported. |
c0ChStride |
Input |
Stride of the C0 channel on the L1 Buffer. The unit is C0_SIZE (32 bytes). The data chunk obtained by splitting eleWiseData in the unit of C0 along the N direction is called the C0 channel. The interval between two C0 channels is called the C0 channel stride. |
Restrictions
None
Returns
None
Examples
For details about the complete example, see Complete Example.
After DataCopy with quantization applied in real time, each element can be added to or subtracted from a LocalTensor of size mSize × nSize. Call SetFixPipeAddr to set parameters related to the LocalTensor address.
1 2 3 4 | __aicore__inline void SetEleSrcPara(const LocalTensor <half>& eleWiseData, uint16_t c0ChStride) { AscendC::SetFixPipeAddr(eleWiseData, c0ChStride); } |