SWDEV-413997 - Initial VMM changes for ROCm path.
Change-Id: I4405fd7b53182eb4c4622835c811c0dc08461537
This commit is contained in:
committed by
Karthik Jayaprakash
parent
8fe1d9dda1
commit
3ef829939a
@@ -748,9 +748,19 @@ bool Buffer::create(bool alloc_local) {
|
||||
owner()->setSvmPtr(orig_dev_ptr);
|
||||
}
|
||||
|
||||
|
||||
|
||||
// Allocate backing storage in device local memory unless UHP or AHP are set
|
||||
cl_mem_flags memFlags = owner()->getMemFlags();
|
||||
|
||||
if (memFlags & ROCCLR_MEM_PHYMEM) {
|
||||
// If this is physical memory request, then get an handle and store it in user data
|
||||
owner()->getUserData().hsa_handle = dev().deviceVmemAlloc(owner()->getSize(), 0);
|
||||
if (owner()->getUserData().hsa_handle == 0) {
|
||||
LogError("HSA Opaque Handle returned was null");
|
||||
}
|
||||
}
|
||||
|
||||
if ((owner()->parent() == nullptr) &&
|
||||
(owner()->getSvmPtr() != nullptr)) {
|
||||
if (dev().forceFineGrain(owner()) || dev().isFineGrainedSystem(true)) {
|
||||
|
||||
Reference in New Issue
Block a user