mirror of
https://github.com/intel/compute-runtime.git
synced 2025-12-21 09:14:47 +08:00
fix: Correct maxBandwidth unit conversation in pmt
Related-To: NEO-12297 Signed-off-by: shubham kumar <shubham.kumar@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
4fc6767119
commit
4b9a86449d
@@ -5,6 +5,7 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#include "shared/source/helpers/constants.h"
|
||||
#include "shared/source/helpers/debug_helpers.h"
|
||||
|
||||
#include "level_zero/sysman/source/shared/windows/pmt/sysman_pmt.h"
|
||||
@@ -556,7 +557,7 @@ ze_result_t SysmanProductHelperHw<gfxProduct>::getMemoryBandWidth(zes_mem_bandwi
|
||||
}
|
||||
|
||||
maxBandwidth = maxBandwidth >> 16;
|
||||
pBandwidth->maxBandwidth = static_cast<uint64_t>(maxBandwidth) * mbpsToBytesPerSecond;
|
||||
pBandwidth->maxBandwidth = static_cast<uint64_t>(maxBandwidth) * MemoryConstants::megaByte;
|
||||
|
||||
// timestamp calcuation
|
||||
uint32_t timeStampL = 0;
|
||||
|
||||
@@ -22,7 +22,7 @@ namespace Sysman {
|
||||
namespace ult {
|
||||
|
||||
constexpr uint32_t memoryHandleComponentCount = 1u;
|
||||
constexpr uint32_t mockMemoryMaxBandwidth = 250000;
|
||||
constexpr uint32_t mockMemoryMaxBandwidth = 2;
|
||||
constexpr uint32_t mockMemoryCurrentBandwidthRead = 3840;
|
||||
constexpr uint32_t mockMemoryCurrentBandwidthWrite = 2560;
|
||||
constexpr uint32_t mockMemoryBandwidthTimestamp = 1230000;
|
||||
|
||||
@@ -143,7 +143,7 @@ HWTEST2_F(SysmanDeviceMemoryHelperFixture, GivenValidMemoryHandleWhenGettingBand
|
||||
ze_result_t result = zesMemoryGetBandwidth(handle, &bandwidth);
|
||||
|
||||
EXPECT_EQ(result, ZE_RESULT_SUCCESS);
|
||||
EXPECT_EQ(bandwidth.maxBandwidth, mockMemoryMaxBandwidth);
|
||||
EXPECT_EQ(bandwidth.maxBandwidth, static_cast<uint64_t>(mockMemoryMaxBandwidth * MemoryConstants::megaByte));
|
||||
EXPECT_EQ(bandwidth.readCounter, mockMemoryCurrentBandwidthRead);
|
||||
EXPECT_EQ(bandwidth.writeCounter, mockMemoryCurrentBandwidthWrite);
|
||||
EXPECT_EQ(bandwidth.timestamp, mockMemoryBandwidthTimestamp);
|
||||
|
||||
Reference in New Issue
Block a user