SWDEV-416443 - hipPointerGetAttributes should return correct type for managed memory
Change-Id: Ic197cd8c9d3f5405616ed6e4924ed5577e636b94
[ROCm/clr commit: 84eae1f0a9]
This commit is contained in:
@@ -3379,6 +3379,9 @@ hipError_t hipPointerGetAttributes(hipPointerAttribute_t* attributes, const void
|
|||||||
((memObj->getMemFlags() & kManagedAlloc) == kManagedAlloc) ? true : false;
|
((memObj->getMemFlags() & kManagedAlloc) == kManagedAlloc) ? true : false;
|
||||||
attributes->allocationFlags = memObj->getUserData().flags;
|
attributes->allocationFlags = memObj->getUserData().flags;
|
||||||
attributes->device = memObj->getUserData().deviceId;
|
attributes->device = memObj->getUserData().deviceId;
|
||||||
|
if (attributes->isManaged) {
|
||||||
|
attributes->type = hipMemoryTypeManaged;
|
||||||
|
}
|
||||||
HIP_RETURN(hipSuccess);
|
HIP_RETURN(hipSuccess);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user