Revert "performance: Memory handling improvements"

This reverts commit 5b80bd4d7c.

Signed-off-by: Compute-Runtime-Validation <compute-runtime-validation@intel.com>
This commit is contained in:
Compute-Runtime-Validation
2023-07-20 03:53:34 +02:00
committed by Compute-Runtime-Automation
parent 1434872427
commit 8c155a2e89
37 changed files with 13 additions and 170 deletions

View File

@@ -750,10 +750,6 @@ size_t Buffer::calculateHostPtrSize(const size_t *origin, const size_t *region,
}
bool Buffer::isReadWriteOnCpuAllowed(const Device &device) {
if (!device.getProductHelper().isCachingOnCpuAvailable()) {
return false;
}
if (forceDisallowCPUCopy) {
return false;
}

View File

@@ -7,15 +7,12 @@
#include "opencl/source/mem_obj/mem_obj.h"
#include "shared/source/execution_environment/execution_environment.h"
#include "shared/source/execution_environment/root_device_environment.h"
#include "shared/source/gmm_helper/gmm.h"
#include "shared/source/gmm_helper/resource_info.h"
#include "shared/source/helpers/bit_helpers.h"
#include "shared/source/helpers/get_info.h"
#include "shared/source/memory_manager/allocation_properties.h"
#include "shared/source/memory_manager/memory_manager.h"
#include "shared/source/os_interface/product_helper.h"
#include "shared/source/utilities/buffer_pool_allocator.inl"
#include "shared/source/utilities/heap_allocator.h"
@@ -432,10 +429,8 @@ bool MemObj::isTiledAllocation() const {
bool MemObj::mappingOnCpuAllowed() const {
auto graphicsAllocation = multiGraphicsAllocation.getDefaultGraphicsAllocation();
auto &productHelper = this->executionEnvironment->rootDeviceEnvironments[graphicsAllocation->getRootDeviceIndex()]->getProductHelper();
return !isTiledAllocation() && !peekSharingHandler() && !isMipMapped(this) && !DebugManager.flags.DisableZeroCopyForBuffers.get() &&
!graphicsAllocation->isCompressionEnabled() && MemoryPoolHelper::isSystemMemoryPool(graphicsAllocation->getMemoryPool()) &&
productHelper.isCachingOnCpuAvailable();
!graphicsAllocation->isCompressionEnabled() && MemoryPoolHelper::isSystemMemoryPool(graphicsAllocation->getMemoryPool());
}
void MemObj::storeProperties(const cl_mem_properties *properties) {