From 69e6c8b1c68cb0308ebd5ceebfb4425607e1f127 Mon Sep 17 00:00:00 2001 From: Mayank Raghuwanshi Date: Fri, 11 Nov 2022 19:56:55 +0000 Subject: [PATCH] Add support for retrieving max b/w for DG2 Related-To: LOCI-3425 Signed-off-by: Mayank Raghuwanshi --- .../tools/source/sysman/memory/linux/os_memory_imp_prelim.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/level_zero/tools/source/sysman/memory/linux/os_memory_imp_prelim.cpp b/level_zero/tools/source/sysman/memory/linux/os_memory_imp_prelim.cpp index 5112415712..e05958c6fb 100644 --- a/level_zero/tools/source/sysman/memory/linux/os_memory_imp_prelim.cpp +++ b/level_zero/tools/source/sysman/memory/linux/os_memory_imp_prelim.cpp @@ -185,6 +185,10 @@ ze_result_t LinuxMemoryImp::getBandwidthForDg2(zes_mem_bandwidth_t *pBandwidth) return result; } pBandwidth->timestamp = timeStampVal * 1e-8; // Convert timeStamp into seconds + const std::string maxBwFile = "prelim_lmem_max_bw_Mbps"; + uint64_t maxBw = 0; + pSysfsAccess->read(maxBwFile, maxBw); + pBandwidth->maxBandwidth = maxBw * MbpsToBytesPerSecond; return result; }