Overview
To implement the Tiling function on the host, certain hardware platform information, such as the number of cores on a hardware platform, may be required for Tiling computation. The PlatformAscendC class provides a function for obtaining such platform information.
Header File to Be Included
To use this function, the tiling/platform/platform_ascendc.h header file must be included. An example is as follows.
1 | #include "tiling/platform/platform_ascendc.h" |
Public Member Functions
PlatformAscendC() = delete ~PlatformAscendC() = default explicit PlatformAscendC(fe::PlatFormInfos *platformInfo): platformInfo_(platformInfo) {} uint32_t GetCoreNum(void) const SocVersion GetSocVersion(void) const uint32_t GetCoreNumAic(void) const uint32_t GetCoreNumAiv(void) const uint32_t GetCoreNumVector(void) const uint32_t CalcTschBlockDim(uint32_t sliceNum, uint32_t aicCoreNum, uint32_t aivCoreNum) const void GetCoreMemSize(const CoreMemType &memType, uint64_t &size) const void GetCoreMemBw(const CoreMemType &memType, uint64_t &bwSize) const uint32_t GetLibApiWorkSpaceSize(void) const uint32_t GetResGroupBarrierWorkSpaceSize(void) const uint32_t GetResCubeGroupWorkSpaceSize(void) const
Parent topic: PlatformAscendC