Revert "refactor: Add dc flush mitigation infrastructure"

This reverts commit 1cba900ad9.

Signed-off-by: Compute-Runtime-Validation <compute-runtime-validation@intel.com>
This commit is contained in:
Compute-Runtime-Validation
2024-07-03 07:11:44 +02:00
committed by Compute-Runtime-Automation
parent a96f2ea13a
commit 38872b7e1b
13 changed files with 10 additions and 57 deletions

View File

@@ -195,8 +195,7 @@ bool inline copyHostPointer(Buffer *buffer,
auto memory = buffer->getGraphicsAllocation(rootDeviceIndex);
auto isCompressionEnabled = memory->isCompressionEnabled();
const bool isLocalMemory = !MemoryPoolHelper::isSystemMemoryPool(memory->getMemoryPool());
const bool isGpuCopyRequiredForDcFlushMitigation = productHelper.isDcFlushMitigated() && memory->getAllocationType() != AllocationType::bufferHostMemory;
const bool gpuCopyRequired = isCompressionEnabled || isLocalMemory || isGpuCopyRequiredForDcFlushMitigation;
const bool gpuCopyRequired = isCompressionEnabled || isLocalMemory || productHelper.isDcFlushMitigated();
if (gpuCopyRequired) {
auto &hwInfo = device.getHardwareInfo();
@@ -211,7 +210,7 @@ bool inline copyHostPointer(Buffer *buffer,
isCompressionEnabled == false &&
productHelper.getLocalMemoryAccessMode(hwInfo) != LocalMemoryAccessMode::cpuAccessDisallowed &&
isLockable &&
!isGpuCopyRequiredForDcFlushMitigation;
!productHelper.isDcFlushMitigated();
if (debugManager.flags.CopyHostPtrOnCpu.get() != -1) {
copyOnCpuAllowed = debugManager.flags.CopyHostPtrOnCpu.get() == 1;
@@ -224,7 +223,7 @@ bool inline copyHostPointer(Buffer *buffer,
} else {
auto blitMemoryToAllocationResult = BlitOperationResult::unsupported;
if (productHelper.isBlitterFullySupported(hwInfo) && (isLocalMemory || isGpuCopyRequiredForDcFlushMitigation)) {
if (productHelper.isBlitterFullySupported(hwInfo) && (isLocalMemory || productHelper.isDcFlushMitigated())) {
blitMemoryToAllocationResult = BlitHelperFunctions::blitMemoryToAllocation(device, memory, buffer->getOffset(), hostPtr, {size, 1, 1});
}

View File

@@ -403,7 +403,7 @@ void CopyEngineXeHPAndLater<numTiles, testLocalMemory>::givenSrcCompressedBuffer
template <uint32_t numTiles, bool testLocalMemory>
template <typename FamilyType>
void CopyEngineXeHPAndLater<numTiles, testLocalMemory>::givenCompressedBufferWhenAuxTranslationCalledThenResolveAndCompressImpl() {
if (this->context->getDevice(0u)->areSharedSystemAllocationsAllowed() || !compressionSupported() || this->context->getDevice(0u)->getProductHelper().isDcFlushMitigated()) {
if (this->context->getDevice(0u)->areSharedSystemAllocationsAllowed() || !compressionSupported()) {
// no support for scenarios where stateless is mixed with blitter compression
GTEST_SKIP();
}

View File

@@ -212,9 +212,6 @@ struct PerformanceHintEnqueueMapTest : public PerformanceHintEnqueueTest,
void SetUp() override {
PerformanceHintEnqueueTest::SetUp();
if (context->getDevice(0)->getRootDeviceEnvironment().getProductHelper().isDcFlushMitigated()) {
GTEST_SKIP();
}
}
void TearDown() override {

View File

@@ -1893,10 +1893,6 @@ HWTEST_F(BufferCreateTests, givenClMemCopyHostPointerPassedToBufferCreateWhenAll
auto memoryManager = new MockMemoryManager(true, *executionEnvironment);
executionEnvironment->memoryManager.reset(memoryManager);
if (executionEnvironment->rootDeviceEnvironments[0]->getProductHelper().isDcFlushMitigated()) {
debugManager.flags.AllowDcFlush.set(1);
}
MockClDevice device(new MockDevice(executionEnvironment, mockRootDeviceIndex));
ASSERT_TRUE(device.createEngines());
DeviceFactory::prepareDeviceEnvironments(*device.getExecutionEnvironment());

View File

@@ -115,10 +115,6 @@ HWTEST2_F(PvcAndLaterBufferTests, givenCompressedBufferInSystemAndBlitterSupport
auto pDevice = deviceFactory.rootDevices[0];
auto pMockContext = std::make_unique<MockContext>(pDevice);
if (pDevice->getProductHelper().isDcFlushMitigated()) {
debugManager.flags.AllowDcFlush.set(1);
}
static_cast<MockMemoryManager *>(pDevice->getExecutionEnvironment()->memoryManager.get())->enable64kbpages[0] = true;
static_cast<MockMemoryManager *>(pDevice->getExecutionEnvironment()->memoryManager.get())->localMemorySupported[0] = false;

View File

@@ -152,10 +152,6 @@ HWTEST_F(BufferCreateWindowsTests, givenClMemCopyHostPointerPassedToBufferCreate
auto memoryManager = new MockMemoryManager(true, *executionEnvironment);
executionEnvironment->memoryManager.reset(memoryManager);
if (executionEnvironment->rootDeviceEnvironments[0]->getProductHelper().isDcFlushMitigated()) {
debugManager.flags.AllowDcFlush.set(1);
}
MockClDevice device(new MockDevice(executionEnvironment, mockRootDeviceIndex));
ASSERT_TRUE(device.createEngines());
DeviceFactory::prepareDeviceEnvironments(*device.getExecutionEnvironment());