mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-06 10:26:29 +08:00
Revert "feature: split cache_policy_dg2_and_later.inl file"
This reverts commit 5df982a85d.
Signed-off-by: Compute-Runtime-Validation <compute-runtime-validation@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
ab5b1608b1
commit
9d312995e2
@@ -188,7 +188,6 @@ endif()
|
|||||||
if(SUPPORT_DG2_AND_LATER)
|
if(SUPPORT_DG2_AND_LATER)
|
||||||
list(APPEND NEO_CORE_HELPERS
|
list(APPEND NEO_CORE_HELPERS
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/gfx_core_helper_dg2_and_later.inl
|
${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
|
${CMAKE_CURRENT_SOURCE_DIR}/cache_policy_dg2_and_later.inl
|
||||||
)
|
)
|
||||||
endif()
|
endif()
|
||||||
|
|||||||
@@ -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 {
|
namespace NEO {
|
||||||
|
|
||||||
|
template <PRODUCT_FAMILY gfxProduct>
|
||||||
|
const char *L1CachePolicyHelper<gfxProduct>::getCachingPolicyOptions(bool isDebuggerActive) {
|
||||||
|
using GfxFamily = typename HwMapper<gfxProduct>::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<gfxProduct>::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 <PRODUCT_FAMILY gfxProduct>
|
template <PRODUCT_FAMILY gfxProduct>
|
||||||
uint32_t L1CachePolicyHelper<gfxProduct>::getDefaultL1CachePolicy(bool isDebuggerActive) {
|
uint32_t L1CachePolicyHelper<gfxProduct>::getDefaultL1CachePolicy(bool isDebuggerActive) {
|
||||||
using GfxFamily = typename HwMapper<gfxProduct>::GfxFamily;
|
using GfxFamily = typename HwMapper<gfxProduct>::GfxFamily;
|
||||||
|
|||||||
@@ -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 <PRODUCT_FAMILY gfxProduct>
|
|
||||||
const char *L1CachePolicyHelper<gfxProduct>::getCachingPolicyOptions(bool isDebuggerActive) {
|
|
||||||
using GfxFamily = typename HwMapper<gfxProduct>::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<gfxProduct>::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
|
|
||||||
Reference in New Issue
Block a user