mirror of
https://github.com/intel/compute-runtime.git
synced 2025-12-30 09:58:55 +08:00
fix: ignore read error when getting bandwidth for DG2
Related-To: NEO-9038 Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
a420e34b10
commit
4be1a8f615
@@ -188,10 +188,13 @@ ze_result_t LinuxMemoryImp::getBandwidthForDg2(zes_mem_bandwidth_t *pBandwidth)
|
||||
pBandwidth->maxBandwidth = 0u;
|
||||
const std::string maxBwFile = "prelim_lmem_max_bw_Mbps";
|
||||
uint64_t maxBw = 0;
|
||||
pSysfsAccess->read(maxBwFile, maxBw);
|
||||
result = pSysfsAccess->read(maxBwFile, maxBw);
|
||||
if (result != ZE_RESULT_SUCCESS) {
|
||||
NEO::printDebugString(NEO::DebugManager.flags.PrintDebugMessages.get(), stderr, "Error@ %s():pSysfsAccess->read returning error:0x%x \n", __FUNCTION__, result);
|
||||
}
|
||||
pBandwidth->maxBandwidth = maxBw * MbpsToBytesPerSecond;
|
||||
pBandwidth->timestamp = SysmanDevice::getSysmanTimestamp();
|
||||
return result;
|
||||
return ZE_RESULT_SUCCESS;
|
||||
}
|
||||
|
||||
ze_result_t LinuxMemoryImp::getHbmBandwidthPVC(uint32_t numHbmModules, zes_mem_bandwidth_t *pBandwidth) {
|
||||
|
||||
@@ -501,10 +501,8 @@ TEST_F(SysmanDeviceMemoryFixture, GivenValidMemoryHandleWhenCallingzesSysmanMemo
|
||||
}
|
||||
}
|
||||
|
||||
TEST_F(SysmanDeviceMemoryFixture, GivenValidMemoryHandleWhenCallingzesSysmanMemoryGetBandwidthForDg2PlatformIfIdiReadFailsTheFailureIsReturned) {
|
||||
HWTEST2_F(SysmanDeviceMemoryFixture, GivenValidMemoryHandleWhenCallingzesSysmanMemoryGetBandwidthForDg2PlatformIfIdiReadFailsTheFailureIsReturned, IsDG2) {
|
||||
setLocalSupportedAndReinit(true);
|
||||
auto hwInfo = pLinuxSysmanImp->getSysmanDeviceImp()->getRootDeviceEnvironment().getMutableHardwareInfo();
|
||||
hwInfo->platform.eProductFamily = IGFX_DG2;
|
||||
auto handles = getMemoryHandles(memoryHandleComponentCount);
|
||||
|
||||
for (auto handle : handles) {
|
||||
@@ -521,13 +519,6 @@ TEST_F(SysmanDeviceMemoryFixture, GivenValidMemoryHandleWhenCallingzesSysmanMemo
|
||||
|
||||
HWTEST2_F(SysmanDeviceMemoryFixture, GivenValidMemoryHandleWhenCallingzesSysmanMemoryGetBandwidthForDg2PlatformAndReadingMaxBwFailsThenMaxBwIsReturnedAsZero, IsDG2) {
|
||||
setLocalSupportedAndReinit(true);
|
||||
|
||||
// auto hwInfo = *NEO::defaultHwInfo.get();
|
||||
// hwInfo.platform.eProductFamily = IGFX_DG2;
|
||||
// pLinuxSysmanImp->getDeviceHandle()->getNEODevice()->getRootDeviceEnvironmentRef().setHwInfoAndInitHelpers(&hwInfo);
|
||||
|
||||
auto hwInfo = pSysmanDeviceImp->getHardwareInfo();
|
||||
hwInfo.platform.eProductFamily = IGFX_DG2;
|
||||
auto handles = getMemoryHandles(memoryHandleComponentCount);
|
||||
|
||||
for (const auto &handle : handles) {
|
||||
@@ -542,11 +533,9 @@ HWTEST2_F(SysmanDeviceMemoryFixture, GivenValidMemoryHandleWhenCallingzesSysmanM
|
||||
}
|
||||
}
|
||||
|
||||
TEST_F(SysmanDeviceMemoryFixture, GivenValidMemoryHandleWhenCallingzesSysmanMemoryGetBandwidthForDg2PlatformIfIdiWriteFailsTheFailureIsReturned) {
|
||||
HWTEST2_F(SysmanDeviceMemoryFixture, GivenValidMemoryHandleWhenCallingzesSysmanMemoryGetBandwidthForDg2PlatformIfIdiWriteFailsTheFailureIsReturned, IsDG2) {
|
||||
setLocalSupportedAndReinit(true);
|
||||
|
||||
auto hwInfo = pLinuxSysmanImp->getSysmanDeviceImp()->getRootDeviceEnvironment().getMutableHardwareInfo();
|
||||
hwInfo->platform.eProductFamily = IGFX_DG2;
|
||||
auto handles = getMemoryHandles(memoryHandleComponentCount);
|
||||
|
||||
for (auto handle : handles) {
|
||||
|
||||
@@ -194,10 +194,13 @@ ze_result_t LinuxMemoryImp::getBandwidthForDg2(zes_mem_bandwidth_t *pBandwidth)
|
||||
pBandwidth->maxBandwidth = 0u;
|
||||
const std::string maxBwFile = "prelim_lmem_max_bw_Mbps";
|
||||
uint64_t maxBw = 0;
|
||||
pSysfsAccess->read(maxBwFile, maxBw);
|
||||
result = pSysfsAccess->read(maxBwFile, maxBw);
|
||||
if (result != ZE_RESULT_SUCCESS) {
|
||||
NEO::printDebugString(NEO::DebugManager.flags.PrintDebugMessages.get(), stderr, "Error@ %s():pSysfsAccess->read returning error:0x%x \n", __FUNCTION__, result);
|
||||
}
|
||||
pBandwidth->maxBandwidth = maxBw * MbpsToBytesPerSecond;
|
||||
pBandwidth->timestamp = SysmanDevice::getSysmanTimestamp();
|
||||
return result;
|
||||
return ZE_RESULT_SUCCESS;
|
||||
}
|
||||
|
||||
ze_result_t LinuxMemoryImp::getHbmBandwidth(uint32_t numHbmModules, zes_mem_bandwidth_t *pBandwidth) {
|
||||
|
||||
Reference in New Issue
Block a user