mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-03 06:49:52 +08:00
Revert "refactor: Add dc flush mitigation infrastructure"
This reverts commit e4412e385a.
Signed-off-by: Compute-Runtime-Validation <compute-runtime-validation@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
da6a83faa2
commit
ad0d6f5435
@@ -17,8 +17,4 @@ bool CommandQueue::isTimestampWaitEnabled() {
|
||||
return true;
|
||||
}
|
||||
|
||||
bool checkIsGpuCopyRequiredForDcFlushMitigation(AllocationType type) {
|
||||
return type != AllocationType::bufferHostMemory;
|
||||
}
|
||||
|
||||
} // namespace NEO
|
||||
|
||||
@@ -184,8 +184,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,
|
||||
@@ -197,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() && checkIsGpuCopyRequiredForDcFlushMitigation(memory->getAllocationType());
|
||||
const bool gpuCopyRequired = isCompressionEnabled || isLocalMemory || isGpuCopyRequiredForDcFlushMitigation;
|
||||
const bool gpuCopyRequired = isCompressionEnabled || isLocalMemory || productHelper.isDcFlushMitigated();
|
||||
if (gpuCopyRequired) {
|
||||
auto &hwInfo = device.getHardwareInfo();
|
||||
|
||||
@@ -213,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;
|
||||
@@ -226,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});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user