LoadDataUnzip
Applicability
Product |
Supported |
|---|---|
Atlas 350 Accelerator Card |
x |
x |
|
x |
|
x |
|
√ |
|
x |
|
x |
Function Usage
Decompress the data on the GM and load the data to A1, B1, and B2. LoadUnzipIndex needs to be executed to load the compression index table before this API is called.
Prototype
1 2 | template <typename T> __aicore__ inline void LoadDataUnzip(const LocalTensor<T>& dst, const GlobalTensor<T>& src) |
Parameters
Parameter |
Input/Output |
Description |
|---|---|---|
dst |
Output |
Destination operand. Type: LocalTensor. Supported TPosition: A1/B1/B2. When TPosition is A1/B1, the start address of LocalTensor must be 32-byte aligned. When TPosition is B2, the start address of LocalTensor must be 512-byte aligned. The supported data type is int8_t. |
src |
Input |
Source operand of the GlobalTensor type. Its data type must be the same as that of dst. |
Restrictions
- For details about the operand address alignment requirements, see General Address Alignment Restrictions.
Returns
None
Examples
This example is supported on the
1 2 3 4 | uint32_t srcLen = 896, dstLen = 1024, numOfIndexTabEntry = 1; AscendC::LocalTensor<int8_t> weightB1 = inQueueB1.AllocTensor<int8_t>(); AscendC::LoadUnzipIndex(indexGlobal, numOfIndexTabEntry); // Load index data and transfer the compressed index table stored in GM into internal registers. AscendC::LoadDataUnzip(weightB1, weGlobal); // Load data based on the index table in internal registers. |