diff --git a/hipamd/src/hip_memory.cpp b/hipamd/src/hip_memory.cpp index 7a317c8848..4db03a156c 100644 --- a/hipamd/src/hip_memory.cpp +++ b/hipamd/src/hip_memory.cpp @@ -3739,8 +3739,12 @@ hipError_t ihipPointerGetAttributes(void* data, hipPointer_attribute attribute, break; } case HIP_POINTER_ATTRIBUTE_SYNC_MEMOPS : { - // This attribute is ideally used in hipPointerSetAttribute, defaults to true - *reinterpret_cast(data) = true; + if (memObj) { + *reinterpret_cast(data) = memObj->getUserData().sync_mem_ops_; + } else { + *reinterpret_cast(data) = false; + return hipErrorInvalidValue; + } break; } case HIP_POINTER_ATTRIBUTE_BUFFER_ID : {