Choose valid bank from memory bank selector

Related-To: NEO-4645

Change-Id: I8d1f63ba24ead2e77ba6381e4770068bf2eb1725
Signed-off-by: Andrzej Swierczynski <andrzej.swierczynski@intel.com>
This commit is contained in:
Andrzej Swierczynski
2020-06-23 11:30:01 +02:00
committed by sys_ocldev
parent ef4cc0e685
commit a5e4edb327
9 changed files with 54 additions and 19 deletions

View File

@ -3521,6 +3521,7 @@ void *clHostMemAllocINTEL(
cl_mem_flags flags = 0;
cl_mem_flags_intel flagsIntel = 0;
cl_mem_alloc_flags_intel allocflags = 0;
unifiedMemoryProperties.subdeviceBitfield = neoContext->getDeviceBitfieldForAllocation();
if (!MemoryPropertiesHelper::parseMemoryProperties(properties, unifiedMemoryProperties.allocationFlags, flags, flagsIntel,
allocflags, MemoryPropertiesHelper::ObjType::UNKNOWN,
*neoContext)) {
@ -3559,6 +3560,7 @@ void *clDeviceMemAllocINTEL(
cl_mem_flags flags = 0;
cl_mem_flags_intel flagsIntel = 0;
cl_mem_alloc_flags_intel allocflags = 0;
unifiedMemoryProperties.subdeviceBitfield = neoDevice->getDeviceBitfield();
if (!MemoryPropertiesHelper::parseMemoryProperties(properties, unifiedMemoryProperties.allocationFlags, flags, flagsIntel,
allocflags, MemoryPropertiesHelper::ObjType::UNKNOWN,
*neoContext)) {
@ -3573,7 +3575,6 @@ void *clDeviceMemAllocINTEL(
}
unifiedMemoryProperties.device = device;
unifiedMemoryProperties.subdeviceBitfield = neoDevice->getDefaultEngine().osContext->getDeviceBitfield();
return neoContext->getSVMAllocsManager()->createUnifiedMemoryAllocation(neoDevice->getRootDeviceIndex(), size, unifiedMemoryProperties);
}
@ -3626,6 +3627,7 @@ void *clSharedMemAllocINTEL(
if (!ptr) {
err.set(CL_OUT_OF_RESOURCES);
}
return ptr;
}