mirror of
https://github.com/intel/compute-runtime.git
synced 2025-12-19 06:24:51 +08:00
Added changes for maxBandwidth computation in Memory Component.
The memoryBusWidth used for the computation of maxBandwidth has been changed to 128 bytes from 128 bits. Hence the final maxBandwidth need not be further divided by 8 to convert it into bytes/sec. Related-To: LOCI-3833 Signed-off-by: Bari, Pratik <pratik.bari@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
593bd13d4d
commit
e813ae0f4a
@@ -59,6 +59,6 @@ constexpr uint32_t milliFactor = 1000u;
|
||||
constexpr uint32_t microFacor = milliFactor * milliFactor;
|
||||
constexpr uint64_t gigaUnitTransferToUnitTransfer = 1000 * 1000 * 1000;
|
||||
|
||||
constexpr int32_t memoryBusWidth = 128; // bus width in bits
|
||||
constexpr int32_t memoryBusWidth = 128; // bus width in bytes
|
||||
constexpr int32_t numMemoryChannels = 8;
|
||||
#define BITS(x, at, width) (((x) >> (at)) & ((1 << (width)) - 1))
|
||||
|
||||
@@ -262,8 +262,7 @@ ze_result_t LinuxMemoryImp::getHbmBandwidth(uint32_t numHbmModules, zes_mem_band
|
||||
uint64_t hbmFrequency = 0;
|
||||
getHbmFrequency(productFamily, stepping, hbmFrequency);
|
||||
|
||||
pBandwidth->maxBandwidth = memoryBusWidth * hbmFrequency * numHbmModules;
|
||||
pBandwidth->maxBandwidth /= 8; // Divide by 8 to get bandwidth in bytes/sec
|
||||
pBandwidth->maxBandwidth = memoryBusWidth * hbmFrequency * numHbmModules; // Value in bytes/secs
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2020-2022 Intel Corporation
|
||||
* Copyright (C) 2020-2023 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
@@ -57,6 +57,6 @@ constexpr uint32_t milliFactor = 1000u;
|
||||
constexpr uint32_t microFacor = milliFactor * milliFactor;
|
||||
constexpr uint64_t gigaUnitTransferToUnitTransfer = 1000 * 1000 * 1000;
|
||||
|
||||
constexpr int32_t memoryBusWidth = 128; // bus width in bits
|
||||
constexpr int32_t memoryBusWidth = 128; // bus width in bytes
|
||||
constexpr int32_t numMemoryChannels = 8;
|
||||
#define BITS(x, at, width) (((x) >> (at)) & ((1 << (width)) - 1))
|
||||
|
||||
@@ -18,7 +18,7 @@ extern bool sysmanUltsEnable;
|
||||
namespace L0 {
|
||||
namespace ult {
|
||||
|
||||
constexpr int32_t memoryBusWidth = 128; // bus width in bits
|
||||
constexpr int32_t memoryBusWidth = 128; // bus width in bytes
|
||||
constexpr int32_t numMemoryChannels = 8;
|
||||
constexpr uint32_t memoryHandleComponentCount = 1u;
|
||||
const std::string sampleGuid1 = "0xb15a0edc";
|
||||
@@ -427,7 +427,6 @@ HWTEST2_F(SysmanDeviceMemoryFixture, GivenValidMemoryHandleWhenCallingzesSysmanM
|
||||
EXPECT_EQ(bandwidth.timestamp, expectedTimestamp);
|
||||
EXPECT_EQ(bandwidth.timestamp, expectedTimestamp);
|
||||
expectedBandwidth = 128 * hbmRP0Frequency * 1000 * 1000 * 4;
|
||||
expectedBandwidth /= 8;
|
||||
EXPECT_EQ(bandwidth.maxBandwidth, expectedBandwidth);
|
||||
}
|
||||
}
|
||||
@@ -461,7 +460,6 @@ HWTEST2_F(SysmanDeviceMemoryFixture, GivenValidMemoryHandleWhenCallingzesSysmanM
|
||||
expectedTimestamp = (expectedTimestamp << 32) | vF1TimestampLValue;
|
||||
EXPECT_EQ(bandwidth.timestamp, expectedTimestamp);
|
||||
expectedBandwidth = 128 * hbmRP0Frequency * 1000 * 1000 * 4;
|
||||
expectedBandwidth /= 8;
|
||||
EXPECT_EQ(bandwidth.maxBandwidth, expectedBandwidth);
|
||||
}
|
||||
}
|
||||
@@ -485,7 +483,6 @@ HWTEST2_F(SysmanDeviceMemoryFixture, GivenValidUsRevIdForRevisionBWhenCallingzes
|
||||
|
||||
EXPECT_EQ(zesMemoryGetBandwidth(handle, &bandwidth), ZE_RESULT_SUCCESS);
|
||||
uint64_t expectedBandwidth = 128 * hbmRP0Frequency * 1000 * 1000 * 4;
|
||||
expectedBandwidth /= 8;
|
||||
EXPECT_EQ(bandwidth.maxBandwidth, expectedBandwidth);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user