DataCachePreload
Supported Products
Product |
Supported/Unsupported |
|---|---|
√ |
|
√ |
|
√ |
|
√ |
|
x |
|
x |
Function Usage
Preloads data from the specific GM address where the source address is located to the data cache.
Prototype
1 2 | template <typename T> __aicore__ inline void DataCachePreload(const GlobalTensor<uint64_t>& src, const T cacheOffset) |
Parameters
Parameter |
Input/Output |
Description |
|---|---|---|
src |
Input |
Source operand of the GlobalTensor type. The supported data type is uint64_t. |
cacheOffset |
Input |
Load data by offsetting cacheOffset on the source operand. The unit is byte. The supported data type is int16_t or int64_t. |
Returns
None
Constraints
Frequent calls to this API may cause congestion in the reservation station. In this case, this instruction is regarded as a NOP instruction, which blocks the scalar pipeline. Therefore, you are not advised to call this API frequently.
Example
1 2 3 | AscendC::GlobalTensor<uint64_t> srcGlobal; int64_t cacheOffset = 0; AscendC::DataCachePreload(srcGlobal, cacheOffset); |