Revert "feature: add pooling of USM global/constant surface"

This reverts commit 68698c9a74.

Signed-off-by: Compute-Runtime-Validation <compute-runtime-validation@intel.com>
This commit is contained in:
Compute-Runtime-Validation
2025-09-14 15:53:44 +02:00
committed by Compute-Runtime-Automation
parent 28e3bcfea2
commit e2d12e1742
15 changed files with 38 additions and 601 deletions

View File

@@ -218,25 +218,11 @@ cl_int Program::processGenBinary(const ClDevice &clDevice) {
auto &buildInfo = buildInfos[rootDeviceIndex];
if (buildInfo.constantSurface) {
auto gpuAddress = reinterpret_cast<void *>(buildInfo.constantSurface->getGpuAddress());
if (auto usmPool = clDevice.getDevice().getUsmConstantSurfaceAllocPool();
usmPool && usmPool->isInPool(gpuAddress)) {
[[maybe_unused]] auto ret = usmPool->freeSVMAlloc(gpuAddress, false);
DEBUG_BREAK_IF(!ret);
} else {
clDevice.getMemoryManager()->freeGraphicsMemory(buildInfo.constantSurface->getGraphicsAllocation());
}
clDevice.getMemoryManager()->freeGraphicsMemory(buildInfo.constantSurface->getGraphicsAllocation());
buildInfo.constantSurface.reset();
}
if (buildInfo.globalSurface) {
auto gpuAddress = reinterpret_cast<void *>(buildInfo.globalSurface->getGpuAddress());
if (auto usmPool = clDevice.getDevice().getUsmGlobalSurfaceAllocPool();
usmPool && usmPool->isInPool(gpuAddress)) {
[[maybe_unused]] auto ret = usmPool->freeSVMAlloc(gpuAddress, false);
DEBUG_BREAK_IF(!ret);
} else {
clDevice.getMemoryManager()->freeGraphicsMemory(buildInfo.globalSurface->getGraphicsAllocation());
}
clDevice.getMemoryManager()->freeGraphicsMemory(buildInfo.globalSurface->getGraphicsAllocation());
buildInfo.globalSurface.reset();
}