diff --git a/projects/hip/api/hip/hip_memory.cpp b/projects/hip/api/hip/hip_memory.cpp index f45b4944d3..ab6b788921 100644 --- a/projects/hip/api/hip/hip_memory.cpp +++ b/projects/hip/api/hip/hip_memory.cpp @@ -1438,11 +1438,11 @@ hipError_t hipPointerGetAttributes(hipPointerAttribute_t* attributes, const void int device = 0; if (memObj != nullptr) { - attributes->memoryType = hipMemoryTypeDevice; + attributes->memoryType = (CL_MEM_SVM_FINE_GRAIN_BUFFER | memObj->getMemFlags())? hipMemoryTypeHost : hipMemoryTypeDevice; attributes->hostPointer = memObj->getSvmPtr(); attributes->devicePointer = memObj->getSvmPtr(); attributes->isManaged = 0; - attributes->allocationFlags = memObj->getMemFlags(); + attributes->allocationFlags = memObj->getMemFlags() >> 16; amd::Context &memObjCtx = memObj->getContext(); for (auto& ctx : g_devices) {