mirror of
https://github.com/intel/compute-runtime.git
synced 2025-09-15 13:01:45 +08:00
Decrease maxMemAllocSize for BDW to 2040MB
Change-Id: I239fc513c829589f4f457ac23b49c302712f8db8
This commit is contained in:

committed by
sys_ocldev

parent
b21f738479
commit
d74e179aee
@ -352,6 +352,20 @@ TEST(Device_GetCaps, checkGlobalMemSize) {
|
||||
EXPECT_EQ(caps.globalMemSize, expectedSize);
|
||||
}
|
||||
|
||||
TEST(Device_GetCaps, givenGlobalMemSizeWhenCalculatingMaxAllocSizeThenAdjustToHWCap) {
|
||||
auto device = std::unique_ptr<Device>(DeviceHelper<>::create(platformDevices[0]));
|
||||
const auto &caps = device->getDeviceInfo();
|
||||
|
||||
HardwareCapabilities hwCaps = {0};
|
||||
auto &hwHelper = HwHelper::get(platformDevices[0]->pPlatform->eRenderCoreFamily);
|
||||
hwHelper.setupHardwareCapabilities(&hwCaps);
|
||||
|
||||
uint64_t expectedSize = std::max((caps.globalMemSize / 2), static_cast<uint64_t>(128ULL * MemoryConstants::megaByte));
|
||||
expectedSize = std::min(expectedSize, hwCaps.maxMemAllocSize);
|
||||
|
||||
EXPECT_EQ(caps.maxMemAllocSize, expectedSize);
|
||||
}
|
||||
|
||||
TEST(Device_GetCaps, extensionsStringEndsWithSpace) {
|
||||
auto device = std::unique_ptr<Device>(DeviceHelper<>::create(platformDevices[0]));
|
||||
const auto &caps = device->getDeviceInfo();
|
||||
|
Reference in New Issue
Block a user