Revert "fix: Add guid check while calculating Sysman memory Bandwidth"
This reverts commit c3e2e145c5
.
Signed-off-by: Compute-Runtime-Validation <compute-runtime-validation@intel.com>
This commit is contained in:
parent
b1a3ea5a92
commit
7b45b205e3
|
@ -22,9 +22,6 @@ const std::string PlatformMonitoringTech::baseTelemSysFS("/sys/class/intel_pmt")
|
|||
const std::string PlatformMonitoringTech::telem("telem");
|
||||
uint32_t PlatformMonitoringTech::rootDeviceTelemNodeIndex = 0;
|
||||
|
||||
std::string PlatformMonitoringTech::getGuid() {
|
||||
return guid;
|
||||
}
|
||||
ze_result_t PlatformMonitoringTech::readValue(const std::string key, uint32_t &value) {
|
||||
auto offset = keyOffsetMap.find(key);
|
||||
if (offset == keyOffsetMap.end()) {
|
||||
|
@ -149,6 +146,7 @@ ze_result_t PlatformMonitoringTech::init(FsAccess *pFsAccess, const std::string
|
|||
return ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE;
|
||||
}
|
||||
|
||||
std::string guid;
|
||||
std::string guidPath = baseTelemSysFSNode + std::string("/guid");
|
||||
ze_result_t result = pFsAccess->read(guidPath, guid);
|
||||
if (ZE_RESULT_SUCCESS != result) {
|
||||
|
|
|
@ -28,7 +28,6 @@ class PlatformMonitoringTech : NEO::NonCopyableOrMovableClass {
|
|||
virtual ze_result_t readValue(const std::string key, uint32_t &value);
|
||||
virtual ze_result_t readValue(const std::string key, uint64_t &value);
|
||||
static ze_result_t enumerateRootTelemIndex(FsAccess *pFsAccess, std::string &gpuUpstreamPortPath);
|
||||
std::string getGuid();
|
||||
static void create(const std::vector<ze_device_handle_t> &deviceHandles,
|
||||
FsAccess *pFsAccess, std::string &gpuUpstreamPortPath,
|
||||
std::map<uint32_t, L0::PlatformMonitoringTech *> &mapOfSubDeviceIdToPmtObject);
|
||||
|
@ -38,7 +37,6 @@ class PlatformMonitoringTech : NEO::NonCopyableOrMovableClass {
|
|||
static uint32_t rootDeviceTelemNodeIndex;
|
||||
std::string telemetryDeviceEntry{};
|
||||
std::map<std::string, uint64_t> keyOffsetMap;
|
||||
std::string guid;
|
||||
ze_result_t init(FsAccess *pFsAccess, const std::string &gpuUpstreamPortPath, PRODUCT_FAMILY productFamily);
|
||||
static void doInitPmtObject(FsAccess *pFsAccess, uint32_t subdeviceId, PlatformMonitoringTech *pPmt, const std::string &gpuUpstreamPortPath,
|
||||
std::map<uint32_t, L0::PlatformMonitoringTech *> &mapOfSubDeviceIdToPmtObject, PRODUCT_FAMILY productFamily);
|
||||
|
|
|
@ -260,10 +260,6 @@ ze_result_t LinuxMemoryImp::getHbmBandwidth(uint32_t numHbmModules, zes_mem_band
|
|||
}
|
||||
|
||||
ze_result_t LinuxMemoryImp::getHbmBandwidthPVC(uint32_t numHbmModules, zes_mem_bandwidth_t *pBandwidth) {
|
||||
std::string guid = pPmt->getGuid();
|
||||
if (guid != guid64BitMemoryCounters) {
|
||||
return getHbmBandwidth(numHbmModules, pBandwidth);
|
||||
}
|
||||
pBandwidth->readCounter = 0;
|
||||
pBandwidth->writeCounter = 0;
|
||||
pBandwidth->timestamp = 0;
|
||||
|
|
|
@ -11,7 +11,6 @@
|
|||
const std::string vendorIntel("Intel(R) Corporation");
|
||||
const std::string unknown("unknown");
|
||||
const std::string intelPciId("0x8086");
|
||||
const std::string guid64BitMemoryCounters("0xb15a0ede");
|
||||
constexpr uint32_t MbpsToBytesPerSecond = 125000;
|
||||
constexpr double milliVoltsFactor = 1000.0;
|
||||
constexpr uint32_t maxRasErrorCategoryCount = 7;
|
||||
|
|
|
@ -243,7 +243,6 @@ struct MockMemoryNeoDrm : public Drm {
|
|||
|
||||
struct MockMemoryPmt : public PlatformMonitoringTech {
|
||||
|
||||
using PlatformMonitoringTech::guid;
|
||||
using PlatformMonitoringTech::keyOffsetMap;
|
||||
std::vector<ze_result_t> mockReadValueReturnStatus{};
|
||||
std::vector<uint32_t> mockReadArgumentValue{};
|
||||
|
@ -254,9 +253,7 @@ struct MockMemoryPmt : public PlatformMonitoringTech {
|
|||
bool mockVfid0Status = false;
|
||||
bool mockVfid1Status = false;
|
||||
bool isRepeated = false;
|
||||
void setGuid(std::string guid) {
|
||||
this->guid = guid;
|
||||
}
|
||||
|
||||
MockMemoryPmt(FsAccess *pFsAccess, ze_bool_t onSubdevice, uint32_t subdeviceId) : PlatformMonitoringTech(pFsAccess, onSubdevice, subdeviceId) {}
|
||||
ze_result_t readValue(const std::string key, uint32_t &val) override {
|
||||
ze_result_t result = ZE_RESULT_SUCCESS;
|
||||
|
|
|
@ -407,7 +407,7 @@ HWTEST2_F(SysmanDeviceMemoryFixture, GivenValidMemoryHandleWhenCallingzesSysmanM
|
|||
auto &productHelper = pLinuxSysmanImp->getDeviceHandle()->getNEODevice()->getProductHelper();
|
||||
hwInfo->platform.usRevId = productHelper.getHwRevIdFromStepping(REVISION_B, *hwInfo);
|
||||
auto pPmt = static_cast<MockMemoryPmt *>(pLinuxSysmanImp->getPlatformMonitoringTechAccess(properties.subdeviceId));
|
||||
pPmt->setGuid(guid64BitMemoryCounters);
|
||||
|
||||
pPmt->mockVfid0Status = true;
|
||||
pSysfsAccess->mockReadUInt64Value.push_back(hbmRP0Frequency);
|
||||
pSysfsAccess->mockReadReturnStatus.push_back(ZE_RESULT_SUCCESS);
|
||||
|
@ -441,7 +441,7 @@ HWTEST2_F(SysmanDeviceMemoryFixture, GivenValidMemoryHandleWhenCallingzesSysmanM
|
|||
auto &productHelper = pLinuxSysmanImp->getDeviceHandle()->getNEODevice()->getProductHelper();
|
||||
hwInfo->platform.usRevId = productHelper.getHwRevIdFromStepping(REVISION_B, *hwInfo);
|
||||
auto pPmt = static_cast<MockMemoryPmt *>(pLinuxSysmanImp->getPlatformMonitoringTechAccess(properties.subdeviceId));
|
||||
pPmt->setGuid(guid64BitMemoryCounters);
|
||||
|
||||
pPmt->mockVfid1Status = true;
|
||||
pSysfsAccess->mockReadUInt64Value.push_back(hbmRP0Frequency);
|
||||
pSysfsAccess->mockReadReturnStatus.push_back(ZE_RESULT_SUCCESS);
|
||||
|
@ -471,7 +471,6 @@ HWTEST2_F(SysmanDeviceMemoryFixture, GivenValidMemoryHandleWhenCallingzesSysmanM
|
|||
zes_mem_bandwidth_t bandwidth;
|
||||
|
||||
auto pPmt = static_cast<MockMemoryPmt *>(pLinuxSysmanImp->getPlatformMonitoringTechAccess(properties.subdeviceId));
|
||||
pPmt->setGuid(guid64BitMemoryCounters);
|
||||
pPmt->mockReadArgumentValue.push_back(1);
|
||||
pPmt->mockReadValueReturnStatus.push_back(ZE_RESULT_SUCCESS); // Return success after reading VF0_VFID
|
||||
pPmt->mockReadArgumentValue.push_back(0);
|
||||
|
@ -482,24 +481,6 @@ HWTEST2_F(SysmanDeviceMemoryFixture, GivenValidMemoryHandleWhenCallingzesSysmanM
|
|||
}
|
||||
}
|
||||
|
||||
HWTEST2_F(SysmanDeviceMemoryFixture, GivenValidMemoryHandleWhenCallingzesSysmanMemoryGetBandwidthAndVF0_VFIDFailsForOldGuidThenFailureIsReturned, IsPVC) {
|
||||
setLocalSupportedAndReinit(true);
|
||||
auto handles = getMemoryHandles(memoryHandleComponentCount);
|
||||
|
||||
for (auto &handle : handles) {
|
||||
zes_mem_properties_t properties = {};
|
||||
zesMemoryGetProperties(handle, &properties);
|
||||
|
||||
zes_mem_bandwidth_t bandwidth;
|
||||
|
||||
auto pPmt = static_cast<MockMemoryPmt *>(pLinuxSysmanImp->getPlatformMonitoringTechAccess(properties.subdeviceId));
|
||||
pPmt->setGuid("0xb15a0edd");
|
||||
pPmt->mockReadArgumentValue.push_back(1);
|
||||
pPmt->mockReadValueReturnStatus.push_back(ZE_RESULT_ERROR_UNSUPPORTED_FEATURE);
|
||||
EXPECT_EQ(zesMemoryGetBandwidth(handle, &bandwidth), ZE_RESULT_ERROR_UNSUPPORTED_FEATURE);
|
||||
}
|
||||
}
|
||||
|
||||
HWTEST2_F(SysmanDeviceMemoryFixture, GivenValidMemoryHandleWhenCallingzesSysmanMemoryGetBandwidthAndVF0_HBM_READ_HFailsThenFailureIsReturned, IsPVC) {
|
||||
setLocalSupportedAndReinit(true);
|
||||
auto handles = getMemoryHandles(memoryHandleComponentCount);
|
||||
|
@ -511,7 +492,6 @@ HWTEST2_F(SysmanDeviceMemoryFixture, GivenValidMemoryHandleWhenCallingzesSysmanM
|
|||
zes_mem_bandwidth_t bandwidth;
|
||||
|
||||
auto pPmt = static_cast<MockMemoryPmt *>(pLinuxSysmanImp->getPlatformMonitoringTechAccess(properties.subdeviceId));
|
||||
pPmt->setGuid(guid64BitMemoryCounters);
|
||||
pPmt->mockReadArgumentValue.push_back(1);
|
||||
pPmt->mockReadValueReturnStatus.push_back(ZE_RESULT_SUCCESS); // Return success after reading VF0_VFID
|
||||
pPmt->mockReadArgumentValue.push_back(0);
|
||||
|
@ -535,7 +515,6 @@ HWTEST2_F(SysmanDeviceMemoryFixture, GivenValidMemoryHandleWhenCallingzesSysmanM
|
|||
zes_mem_bandwidth_t bandwidth;
|
||||
|
||||
auto pPmt = static_cast<MockMemoryPmt *>(pLinuxSysmanImp->getPlatformMonitoringTechAccess(properties.subdeviceId));
|
||||
pPmt->setGuid(guid64BitMemoryCounters);
|
||||
pPmt->mockReadArgumentValue.push_back(1);
|
||||
pPmt->mockReadValueReturnStatus.push_back(ZE_RESULT_SUCCESS); // Return success after reading VF0_VFID
|
||||
pPmt->mockReadArgumentValue.push_back(0);
|
||||
|
@ -561,7 +540,6 @@ HWTEST2_F(SysmanDeviceMemoryFixture, GivenValidMemoryHandleWhenCallingzesSysmanM
|
|||
zes_mem_bandwidth_t bandwidth;
|
||||
|
||||
auto pPmt = static_cast<MockMemoryPmt *>(pLinuxSysmanImp->getPlatformMonitoringTechAccess(properties.subdeviceId));
|
||||
pPmt->setGuid(guid64BitMemoryCounters);
|
||||
pPmt->mockReadArgumentValue.push_back(1);
|
||||
pPmt->mockReadValueReturnStatus.push_back(ZE_RESULT_SUCCESS); // Return success after reading VF0_VFID
|
||||
pPmt->mockReadArgumentValue.push_back(0);
|
||||
|
@ -755,7 +733,7 @@ HWTEST2_F(SysmanDeviceMemoryFixture, GivenValidMemoryHandleWhenCallingGetBandwid
|
|||
auto &productHelper = pLinuxSysmanImp->getDeviceHandle()->getNEODevice()->getProductHelper();
|
||||
hwInfo->platform.usRevId = productHelper.getHwRevIdFromStepping(REVISION_B, *hwInfo);
|
||||
auto pPmt = static_cast<MockMemoryPmt *>(pLinuxSysmanImp->getPlatformMonitoringTechAccess(0));
|
||||
pPmt->setGuid(guid64BitMemoryCounters);
|
||||
|
||||
pPmt->mockVfid1Status = true;
|
||||
pSysfsAccess->mockReadUInt64Value.push_back(hbmRP0Frequency);
|
||||
pSysfsAccess->mockReadReturnStatus.push_back(ZE_RESULT_SUCCESS);
|
||||
|
@ -777,7 +755,7 @@ HWTEST2_F(SysmanDeviceMemoryFixture, GivenValidMemoryHandleWhenCallingGetBandwid
|
|||
auto &productHelper = pLinuxSysmanImp->getDeviceHandle()->getNEODevice()->getProductHelper();
|
||||
hwInfo->platform.usRevId = productHelper.getHwRevIdFromStepping(REVISION_B, *hwInfo);
|
||||
auto pPmt = static_cast<MockMemoryPmt *>(pLinuxSysmanImp->getPlatformMonitoringTechAccess(0));
|
||||
pPmt->setGuid(guid64BitMemoryCounters);
|
||||
|
||||
pPmt->mockVfid0Status = true;
|
||||
pSysfsAccess->mockReadUInt64Value.push_back(hbmRP0Frequency);
|
||||
pSysfsAccess->mockReadReturnStatus.push_back(ZE_RESULT_SUCCESS);
|
||||
|
@ -836,7 +814,6 @@ HWTEST2_F(SysmanDeviceMemoryFixture, GivenValidUsRevIdForRevisionBWhenCallingzes
|
|||
hwInfo->platform.usRevId = productHelper.getHwRevIdFromStepping(REVISION_B, *hwInfo);
|
||||
auto pPmt = static_cast<MockMemoryPmt *>(pLinuxSysmanImp->getPlatformMonitoringTechAccess(properties.subdeviceId));
|
||||
pPmt->mockVfid1Status = true;
|
||||
pPmt->setGuid(guid64BitMemoryCounters);
|
||||
pSysfsAccess->mockReadUInt64Value.push_back(hbmRP0Frequency);
|
||||
pSysfsAccess->mockReadReturnStatus.push_back(ZE_RESULT_SUCCESS);
|
||||
|
||||
|
@ -1051,7 +1028,6 @@ TEST_F(SysmanDeviceMemoryFixture, GivenValidMemoryHandleWhenBothVfid0AndVfid1Are
|
|||
zes_mem_bandwidth_t bandwidth;
|
||||
|
||||
auto pPmt = static_cast<MockMemoryPmt *>(pLinuxSysmanImp->getPlatformMonitoringTechAccess(properties.subdeviceId));
|
||||
pPmt->setGuid(guid64BitMemoryCounters);
|
||||
pPmt->mockReadArgumentValue.push_back(0);
|
||||
pPmt->mockReadValueReturnStatus.push_back(ZE_RESULT_SUCCESS); // Return success after reading VF0_VFID
|
||||
pPmt->mockReadArgumentValue.push_back(0);
|
||||
|
|
Loading…
Reference in New Issue