refactor: remove unused dc flush mitigation

Signed-off-by: Lukasz Jobczyk <lukasz.jobczyk@intel.com>
This commit is contained in:
Lukasz Jobczyk
2025-05-09 06:55:52 +00:00
committed by Compute-Runtime-Automation
parent 4e823f9e6e
commit 1d1414febc
48 changed files with 75 additions and 735 deletions

View File

@@ -672,8 +672,7 @@ cl_int CommandQueue::enqueueReleaseSharedObjects(cl_uint numObjects, const cl_me
}
if (this->getGpgpuCommandStreamReceiver().isDirectSubmissionEnabled()) {
if (this->getDevice().getProductHelper().isDcFlushMitigated() || isDisplayableReleased) {
this->getGpgpuCommandStreamReceiver().registerDcFlushForDcMitigation();
if (isDisplayableReleased) {
this->getGpgpuCommandStreamReceiver().sendRenderStateCacheFlush();
{
TakeOwnershipWrapper<CommandQueue> queueOwnership(*this);

View File

@@ -682,16 +682,6 @@ Buffer *Context::BufferPoolAllocator::allocateBufferFromPool(const MemoryPropert
bufferFromPool = this->allocateFromPools(memoryProperties, flags, flagsIntel, requestedSize, hostPtr, errcodeRet);
if (bufferFromPool != nullptr) {
for (const auto rootDeviceIndex : this->context->getRootDeviceIndices()) {
auto cmdQ = this->context->getSpecialQueue(rootDeviceIndex);
if (cmdQ->getDevice().getProductHelper().isDcFlushMitigated()) {
auto &csr = cmdQ->getGpgpuCommandStreamReceiver();
auto lock = csr.obtainUniqueOwnership();
csr.registerDcFlushForDcMitigation();
csr.flushTagUpdate();
}
}
return bufferFromPool;
}

View File

@@ -1,5 +1,5 @@
/*
* Copyright (C) 2020-2024 Intel Corporation
* Copyright (C) 2020-2025 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
@@ -17,8 +17,4 @@ bool CommandQueue::isTimestampWaitEnabled() {
return true;
}
bool checkIsGpuCopyRequiredForDcFlushMitigation(AllocationType type) {
return type != AllocationType::bufferHostMemory;
}
} // namespace NEO

View File

@@ -204,8 +204,6 @@ Buffer *Buffer::create(Context *context,
flags, 0, size, hostPtr, bufferCreateArgs, errcodeRet);
}
extern bool checkIsGpuCopyRequiredForDcFlushMitigation(AllocationType type);
bool inline copyHostPointer(Buffer *buffer,
Device &device,
size_t size,
@@ -217,8 +215,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() && checkIsGpuCopyRequiredForDcFlushMitigation(memory->getAllocationType());
const bool gpuCopyRequired = isCompressionEnabled || isLocalMemory || isGpuCopyRequiredForDcFlushMitigation;
const bool gpuCopyRequired = isCompressionEnabled || isLocalMemory;
if (gpuCopyRequired) {
auto &hwInfo = device.getHardwareInfo();
@@ -241,14 +238,11 @@ bool inline copyHostPointer(Buffer *buffer,
memory->setAubWritable(true, GraphicsAllocation::defaultBank);
memory->setTbxWritable(true, GraphicsAllocation::defaultBank);
memcpy_s(ptrOffset(lockedPointer, buffer->getOffset()), size, hostPtr, size);
if (isGpuCopyRequiredForDcFlushMitigation) {
CpuIntrinsics::sfence();
}
return true;
} else {
auto blitMemoryToAllocationResult = BlitOperationResult::unsupported;
if (productHelper.isBlitterFullySupported(hwInfo) && (isLocalMemory || isGpuCopyRequiredForDcFlushMitigation)) {
if (productHelper.isBlitterFullySupported(hwInfo) && isLocalMemory) {
device.stopDirectSubmissionForCopyEngine();
blitMemoryToAllocationResult = BlitHelperFunctions::blitMemoryToAllocation(device, memory, buffer->getOffset(), hostPtr, {size, 1, 1});
}