fix(ocl): do not reuse usm for globals export

Allocating global surface is expecting that the usm allocation is zeroed
out. Reusing allocations can be filled with junk data and this caused
errors.

Resolves: HSD-18038551036, HSD-18038551766, HSD-18038551957, HSD-18038552252

Signed-off-by: Dominik Dabek <dominik.dabek@intel.com>
This commit is contained in:
Dominik Dabek
2024-05-21 13:29:16 +00:00
committed by Compute-Runtime-Automation
parent 3890f21600
commit c9758216fc
6 changed files with 42 additions and 2 deletions

View File

@@ -32,6 +32,12 @@ struct MockSVMAllocsManager : public SVMAllocsManager {
prefetchMemoryCalled = true;
}
bool prefetchMemoryCalled = false;
void *createUnifiedMemoryAllocation(size_t size, const UnifiedMemoryProperties &memoryProperties) override {
requestedZeroedOutAllocation = memoryProperties.needZeroedOutAllocation;
return SVMAllocsManager::createUnifiedMemoryAllocation(size, memoryProperties);
}
bool requestedZeroedOutAllocation = false;
};
template <bool enableLocalMemory>