diff --git a/shared/source/helpers/CMakeLists.txt b/shared/source/helpers/CMakeLists.txt index 9bf4c80dd4..e8e2cd5959 100644 --- a/shared/source/helpers/CMakeLists.txt +++ b/shared/source/helpers/CMakeLists.txt @@ -188,7 +188,6 @@ endif() if(SUPPORT_DG2_AND_LATER) list(APPEND NEO_CORE_HELPERS ${CMAKE_CURRENT_SOURCE_DIR}/gfx_core_helper_dg2_and_later.inl - ${CMAKE_CURRENT_SOURCE_DIR}/get_caching_policy_options.inl ${CMAKE_CURRENT_SOURCE_DIR}/cache_policy_dg2_and_later.inl ) endif() diff --git a/shared/source/helpers/cache_policy_dg2_and_later.inl b/shared/source/helpers/cache_policy_dg2_and_later.inl index 64d2847687..edf551a731 100644 --- a/shared/source/helpers/cache_policy_dg2_and_later.inl +++ b/shared/source/helpers/cache_policy_dg2_and_later.inl @@ -5,10 +5,32 @@ * */ -#include "shared/source/helpers/get_caching_policy_options.inl" +#include "shared/source/helpers/cache_policy.h" +#include "shared/source/helpers/cache_policy_base.inl" +#include "shared/source/helpers/hw_mapper.h" namespace NEO { +template +const char *L1CachePolicyHelper::getCachingPolicyOptions(bool isDebuggerActive) { + using GfxFamily = typename HwMapper::GfxFamily; + + static constexpr const char *writeBackCachingPolicy = "-cl-store-cache-default=7 -cl-load-cache-default=4"; + static constexpr const char *writeByPassCachingPolicy = "-cl-store-cache-default=2 -cl-load-cache-default=4"; + static constexpr const char *uncachedCachingPolicy = "-cl-store-cache-default=2 -cl-load-cache-default=2"; + + switch (L1CachePolicyHelper::getL1CachePolicy(isDebuggerActive)) { + case GfxFamily::STATE_BASE_ADDRESS::L1_CACHE_POLICY_WBP: + return writeByPassCachingPolicy; + case GfxFamily::STATE_BASE_ADDRESS::L1_CACHE_POLICY_WB: + return writeBackCachingPolicy; + case GfxFamily::STATE_BASE_ADDRESS::L1_CACHE_POLICY_UC: + return uncachedCachingPolicy; + default: + return nullptr; + } +} + template uint32_t L1CachePolicyHelper::getDefaultL1CachePolicy(bool isDebuggerActive) { using GfxFamily = typename HwMapper::GfxFamily; diff --git a/shared/source/helpers/get_caching_policy_options.inl b/shared/source/helpers/get_caching_policy_options.inl deleted file mode 100644 index ea8b4b3b73..0000000000 --- a/shared/source/helpers/get_caching_policy_options.inl +++ /dev/null @@ -1,34 +0,0 @@ -/* - * Copyright (C) 2024 Intel Corporation - * - * SPDX-License-Identifier: MIT - * - */ - -#include "shared/source/helpers/cache_policy.h" -#include "shared/source/helpers/cache_policy_base.inl" -#include "shared/source/helpers/hw_mapper.h" - -namespace NEO { - -template -const char *L1CachePolicyHelper::getCachingPolicyOptions(bool isDebuggerActive) { - using GfxFamily = typename HwMapper::GfxFamily; - - static constexpr const char *writeBackCachingPolicy = "-cl-store-cache-default=7 -cl-load-cache-default=4"; - static constexpr const char *writeByPassCachingPolicy = "-cl-store-cache-default=2 -cl-load-cache-default=4"; - static constexpr const char *uncachedCachingPolicy = "-cl-store-cache-default=2 -cl-load-cache-default=2"; - - switch (L1CachePolicyHelper::getL1CachePolicy(isDebuggerActive)) { - case GfxFamily::STATE_BASE_ADDRESS::L1_CACHE_POLICY_WBP: - return writeByPassCachingPolicy; - case GfxFamily::STATE_BASE_ADDRESS::L1_CACHE_POLICY_WB: - return writeBackCachingPolicy; - case GfxFamily::STATE_BASE_ADDRESS::L1_CACHE_POLICY_UC: - return uncachedCachingPolicy; - default: - return nullptr; - } -} - -} // namespace NEO