mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-12 00:59:38 +08:00
Revert "fix: Defer MOCS to PAT"
This reverts commit 6c75ec3116.
Signed-off-by: Compute-Runtime-Validation <compute-runtime-validation@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
bca3fecaa0
commit
ce0ccacef6
@@ -9,7 +9,6 @@
|
||||
#include "shared/source/command_stream/csr_definitions.h"
|
||||
#include "shared/source/command_stream/linear_stream.h"
|
||||
#include "shared/source/command_stream/stream_properties.h"
|
||||
#include "shared/source/gmm_helper/cache_settings_helper.h"
|
||||
#include "shared/source/helpers/blit_properties_container.h"
|
||||
#include "shared/source/helpers/cache_policy.h"
|
||||
#include "shared/source/helpers/common_types.h"
|
||||
@@ -601,7 +600,7 @@ class CommandStreamReceiver {
|
||||
|
||||
std::chrono::microseconds gpuHangCheckPeriod{500'000};
|
||||
uint32_t lastSentL3Config = 0;
|
||||
uint32_t latestSentStatelessMocsConfig = CacheSettings::unknownMocs;
|
||||
uint32_t latestSentStatelessMocsConfig = 0;
|
||||
uint64_t lastSentSliceCount = QueueSliceCount::defaultSliceCount;
|
||||
|
||||
uint32_t requiredScratchSlot0Size = 0;
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
#include "shared/source/gmm_helper/gmm_lib.h"
|
||||
|
||||
namespace CacheSettings {
|
||||
inline constexpr uint32_t unknownMocs = -1;
|
||||
inline constexpr uint32_t unknownMocs = GMM_RESOURCE_USAGE_UNKNOWN;
|
||||
} // namespace CacheSettings
|
||||
|
||||
namespace NEO {
|
||||
|
||||
@@ -15,7 +15,6 @@
|
||||
#include "shared/source/helpers/gfx_core_helper.h"
|
||||
#include "shared/source/helpers/hw_info.h"
|
||||
#include "shared/source/memory_manager/graphics_allocation.h"
|
||||
#include "shared/source/os_interface/product_helper.h"
|
||||
|
||||
#include <algorithm>
|
||||
|
||||
@@ -38,10 +37,6 @@ uint32_t GmmHelper::getMOCS(uint32_t type) const {
|
||||
type = GMM_RESOURCE_USAGE_OCL_BUFFER_CACHELINE_MISALIGNED;
|
||||
}
|
||||
|
||||
if (this->rootDeviceEnvironment.getProductHelper().isNewCoherencyModelSupported()) {
|
||||
return 0u;
|
||||
}
|
||||
|
||||
MEMORY_OBJECT_CONTROL_STATE mocs = gmmClientContext->cachePolicyGetMemoryObject(nullptr, static_cast<GMM_RESOURCE_USAGE_TYPE>(type));
|
||||
|
||||
return static_cast<uint32_t>(mocs.DwordValue);
|
||||
|
||||
@@ -447,10 +447,6 @@ GraphicsAllocation *WddmMemoryManager::allocateGraphicsMemoryForNonSvmHostPtr(co
|
||||
GmmRequirements gmmRequirements{};
|
||||
gmmRequirements.allowLargePages = true;
|
||||
gmmRequirements.preferCompressed = false;
|
||||
if (productHelper.overrideAllocationCacheable(allocationData)) {
|
||||
gmmRequirements.overriderCacheable.enableOverride = true;
|
||||
gmmRequirements.overriderCacheable.value = true;
|
||||
}
|
||||
|
||||
auto gmm = new Gmm(executionEnvironment.rootDeviceEnvironments[allocationData.rootDeviceIndex]->getGmmHelper(), alignedPtr, alignedSize, 0u,
|
||||
CacheSettingsHelper::getGmmUsageType(wddmAllocation->getAllocationType(), !!allocationData.flags.uncacheable, productHelper), {}, gmmRequirements);
|
||||
|
||||
@@ -338,7 +338,7 @@ HWTEST_F(CommandStreamReceiverTest, WhenCreatingCsrThenFlagsAreSetCorrectly) {
|
||||
EXPECT_EQ(0u, csr.lastSentL3Config);
|
||||
EXPECT_EQ(-1, csr.lastMediaSamplerConfig);
|
||||
EXPECT_EQ(PreemptionMode::Initial, csr.lastPreemptionMode);
|
||||
EXPECT_EQ(static_cast<uint32_t>(-1), csr.latestSentStatelessMocsConfig);
|
||||
EXPECT_EQ(0u, csr.latestSentStatelessMocsConfig);
|
||||
}
|
||||
|
||||
TEST_F(CommandStreamReceiverTest, givenBaseDownloadAllocationCalledThenDoesNotChangeAnything) {
|
||||
|
||||
@@ -1044,35 +1044,11 @@ TEST(GmmHelperTest, givenEnableFtrTile64OptimizationDebugKeyWhenSetThenProperVal
|
||||
}
|
||||
}
|
||||
|
||||
TEST(GmmHelperTest, givenNewCoherencyModelWhenGetMocsThenDeferToPat) {
|
||||
decltype(GmmHelper::createGmmContextWrapperFunc) createGmmContextSave = GmmHelper::createGmmContextWrapperFunc;
|
||||
GmmHelper::createGmmContextWrapperFunc = GmmClientContext::create<MockGmmClientContext>;
|
||||
|
||||
MockExecutionEnvironment executionEnvironment{};
|
||||
if (!executionEnvironment.rootDeviceEnvironments[0]->getProductHelper().isNewCoherencyModelSupported()) {
|
||||
GTEST_SKIP();
|
||||
}
|
||||
auto gmmHelper = executionEnvironment.rootDeviceEnvironments[0]->getGmmHelper();
|
||||
|
||||
EXPECT_EQ(0u, gmmHelper->getMOCS(GMM_RESOURCE_USAGE_OCL_BUFFER_CACHELINE_MISALIGNED));
|
||||
EXPECT_EQ(0u, gmmHelper->getMOCS(GMM_RESOURCE_USAGE_OCL_STATE_HEAP_BUFFER));
|
||||
EXPECT_EQ(0u, gmmHelper->getMOCS(GMM_RESOURCE_USAGE_OCL_IMAGE));
|
||||
EXPECT_EQ(0u, gmmHelper->getMOCS(GMM_RESOURCE_USAGE_OCL_IMAGE_FROM_BUFFER));
|
||||
EXPECT_EQ(0u, gmmHelper->getMOCS(GMM_RESOURCE_USAGE_OCL_BUFFER_CONST));
|
||||
EXPECT_EQ(0u, gmmHelper->getMOCS(GMM_RESOURCE_USAGE_OCL_BUFFER));
|
||||
EXPECT_EQ(0u, gmmHelper->getMOCS(GMM_RESOURCE_USAGE_OCL_INLINE_CONST_HDC));
|
||||
|
||||
GmmHelper::createGmmContextWrapperFunc = createGmmContextSave;
|
||||
}
|
||||
|
||||
TEST(GmmHelperTest, givenGmmHelperAndL3CacheDisabledForDebugThenCorrectMOCSIsReturned) {
|
||||
decltype(GmmHelper::createGmmContextWrapperFunc) createGmmContextSave = GmmHelper::createGmmContextWrapperFunc;
|
||||
GmmHelper::createGmmContextWrapperFunc = GmmClientContext::create<MockGmmClientContext>;
|
||||
|
||||
MockExecutionEnvironment executionEnvironment{};
|
||||
if (executionEnvironment.rootDeviceEnvironments[0]->getProductHelper().isNewCoherencyModelSupported()) {
|
||||
GTEST_SKIP();
|
||||
}
|
||||
auto gmmHelper = executionEnvironment.rootDeviceEnvironments[0]->getGmmHelper();
|
||||
|
||||
auto uncachedMocs = gmmHelper->getMOCS(GMM_RESOURCE_USAGE_OCL_BUFFER_CACHELINE_MISALIGNED);
|
||||
@@ -1102,9 +1078,6 @@ TEST(GmmHelperTest, givenGmmHelperAndForceAllResourcesUncachedDebugVariableSetTh
|
||||
GmmHelper::createGmmContextWrapperFunc = GmmClientContext::create<MockGmmClientContext>;
|
||||
|
||||
MockExecutionEnvironment executionEnvironment{};
|
||||
if (executionEnvironment.rootDeviceEnvironments[0]->getProductHelper().isNewCoherencyModelSupported()) {
|
||||
GTEST_SKIP();
|
||||
}
|
||||
auto gmmHelper = executionEnvironment.rootDeviceEnvironments[0]->getGmmHelper();
|
||||
|
||||
auto uncachedMocs = gmmHelper->getMOCS(GMM_RESOURCE_USAGE_OCL_BUFFER_CACHELINE_MISALIGNED);
|
||||
|
||||
Reference in New Issue
Block a user