From 57eb19557186335baffb51132cb411d037eb5c5b Mon Sep 17 00:00:00 2001 From: Filip Hazubski Date: Mon, 23 May 2022 18:58:36 +0000 Subject: [PATCH] Correct calculating of CL_DEVICE_GLOBAL_MEM_CACHE_SIZE value Related-To: NEO-6991, NEO-6993 Signed-off-by: Filip Hazubski --- opencl/source/cl_device/cl_device_caps.cpp | 2 +- shared/source/gen12lp/hw_info_adlp.cpp | 1 + shared/source/xe_hp_core/hw_info_xe_hp_sdv.cpp | 1 + shared/source/xe_hpc_core/hw_info_pvc.cpp | 1 + shared/source/xe_hpg_core/hw_info_dg2.cpp | 1 + 5 files changed, 5 insertions(+), 1 deletion(-) diff --git a/opencl/source/cl_device/cl_device_caps.cpp b/opencl/source/cl_device/cl_device_caps.cpp index b6f14b6da7..33ceb0d835 100644 --- a/opencl/source/cl_device/cl_device_caps.cpp +++ b/opencl/source/cl_device/cl_device_caps.cpp @@ -287,7 +287,7 @@ void ClDevice::initializeCaps() { //copy system info to prevent misaligned reads const auto systemInfo = hwInfo.gtSystemInfo; - deviceInfo.globalMemCacheSize = systemInfo.L3BankCount * 128 * KB; + deviceInfo.globalMemCacheSize = systemInfo.L3CacheSizeInKb * KB; deviceInfo.grfSize = hwInfo.capabilityTable.grfSize; deviceInfo.globalMemCacheType = CL_READ_WRITE_CACHE; diff --git a/shared/source/gen12lp/hw_info_adlp.cpp b/shared/source/gen12lp/hw_info_adlp.cpp index 6bd208bbb3..84f6006eb5 100644 --- a/shared/source/gen12lp/hw_info_adlp.cpp +++ b/shared/source/gen12lp/hw_info_adlp.cpp @@ -161,6 +161,7 @@ void ADLP_CONFIG::setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTable gtSysInfo->MaxSlicesSupported = ADLP::maxSlicesSupported; gtSysInfo->MaxSubSlicesSupported = ADLP::maxSubslicesSupported; + gtSysInfo->L3CacheSizeInKb = 1; gtSysInfo->L3BankCount = 1; gtSysInfo->CCSInfo.IsValid = true; diff --git a/shared/source/xe_hp_core/hw_info_xe_hp_sdv.cpp b/shared/source/xe_hp_core/hw_info_xe_hp_sdv.cpp index c9b8ad387b..0a18c99c0d 100644 --- a/shared/source/xe_hp_core/hw_info_xe_hp_sdv.cpp +++ b/shared/source/xe_hp_core/hw_info_xe_hp_sdv.cpp @@ -173,6 +173,7 @@ void XE_HP_SDV_CONFIG::setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeature gtSysInfo->MaxSlicesSupported = gtSysInfo->SliceCount; gtSysInfo->MaxSubSlicesSupported = gtSysInfo->SubSliceCount; + gtSysInfo->L3CacheSizeInKb = 1; gtSysInfo->L3BankCount = 1; gtSysInfo->CCSInfo.IsValid = true; diff --git a/shared/source/xe_hpc_core/hw_info_pvc.cpp b/shared/source/xe_hpc_core/hw_info_pvc.cpp index 795f86d595..31974f4aeb 100644 --- a/shared/source/xe_hpc_core/hw_info_pvc.cpp +++ b/shared/source/xe_hpc_core/hw_info_pvc.cpp @@ -203,6 +203,7 @@ void PVC_CONFIG::setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableA gtSysInfo->MaxSlicesSupported = gtSysInfo->SliceCount; gtSysInfo->MaxSubSlicesSupported = gtSysInfo->SubSliceCount; + gtSysInfo->L3CacheSizeInKb = 1; gtSysInfo->L3BankCount = 1; gtSysInfo->CCSInfo.IsValid = true; diff --git a/shared/source/xe_hpg_core/hw_info_dg2.cpp b/shared/source/xe_hpg_core/hw_info_dg2.cpp index f64c70c543..1fabd78baa 100644 --- a/shared/source/xe_hpg_core/hw_info_dg2.cpp +++ b/shared/source/xe_hpg_core/hw_info_dg2.cpp @@ -176,6 +176,7 @@ void DG2_CONFIG::setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableA gtSysInfo->MaxSlicesSupported = gtSysInfo->SliceCount; gtSysInfo->MaxSubSlicesSupported = gtSysInfo->SubSliceCount; + gtSysInfo->L3CacheSizeInKb = 1; gtSysInfo->L3BankCount = 1; gtSysInfo->CCSInfo.IsValid = true;