For apu: call commitSvmMemory() from Device::svmAlloc()

Change-Id: Ic6e9b2ad4624e7e1c50835d3825254c76e764bf0


[ROCm/clr commit: 532083f87c]
This commit is contained in:
Jason Tang
2020-06-19 10:32:42 -04:00
committed by Jason Tang
parent e8de9c3322
commit b2e264b2c1
@@ -2237,6 +2237,10 @@ void* Device::svmAlloc(amd::Context& context, size_t size, size_t alignment, cl_
// add the information to context so that we can use it later.
amd::MemObjMap::AddMemObj(mem->getSvmPtr(), mem);
svmPtr = mem->getSvmPtr();
if (settings().apuSystem_ && gpuMem->isHostMemDirectAccess()) {
mem->commitSvmMemory();
}
} else {
// find the existing amd::mem object
mem = amd::MemObjMap::FindMemObj(svmPtr);