mirror of
https://github.com/intel/compute-runtime.git
synced 2025-12-31 12:11:31 +08:00
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:
committed by
Compute-Runtime-Automation
parent
28e3bcfea2
commit
e2d12e1742
@@ -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();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user