SWDEV-446610 - Attribute HIP_POINTER_ATTRIBUTE_SYNC_MEMOPS should return the correct value

Change-Id: Ieced2ee61bba28f2d1df96893a661287b0a5c7b7
This commit is contained in:
Satyanvesh Dittakavi
2024-03-06 18:33:30 +00:00
bovenliggende bf74ef4025
commit 8f7acbdadb
+6 -2
Bestand weergeven
@@ -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<bool*>(data) = true;
if (memObj) {
*reinterpret_cast<bool*>(data) = memObj->getUserData().sync_mem_ops_;
} else {
*reinterpret_cast<bool*>(data) = false;
return hipErrorInvalidValue;
}
break;
}
case HIP_POINTER_ATTRIBUTE_BUFFER_ID : {