GetCoreMemBw
Function
Obtains the bandwidth size of the memory on the hardware platform. Types of the hardware storage space are defined as follows:
1 2 3 4 5 6 7 8 9 10 | enum class CoreMemType { L0_A = 0, // Reserved. L0_B = 1, // Reserved. L0_C = 2, // Reserved. L1 = 3, // Reserved. L2 = 4, UB = 5, // Reserved. HBM = 6, RESERVED }; |
Prototype
1 | void GetCoreMemBw(const CoreMemType &memType, uint64_t &bwSize) const |
Parameters
Parameter |
Input/Output |
Description |
|---|---|---|
memType |
Input |
Hardware memory type. |
bwSize |
Output |
Bandwidth of the storage space of the corresponding hardware. The unit is byte/cycle, and cycle indicates the clock cycle. |
Returns
None
Constraints
None
Examples
1 2 3 4 5 6 7 | ge::graphStatus TilingXXX(gert::TilingContext* context) { auto ascendcPlatform = platform_ascendc::PlatformAscendC(context->GetPlatformInfo()); uint64_t l2_bw; ascendcPlatform.GetCoreMemBw(platform_ascendc::CoreMemType::L2, l2_bw); // ... return ret; } |
Parent topic: PlatformAscendC