Allow hipMallocManaged capturing only in relaxed mode (#383)

Co-authored-by: Anusha GodavarthySurya <Anusha.GodavarthySurya@amd.com>
Cette révision appartient à :
Stojiljkovic, Vladana
2025-05-22 17:21:30 +02:00
révisé par GitHub
Parent 9ef5602453
révision 69112331ac
+2
Voir le fichier
@@ -65,6 +65,8 @@ static_assert(static_cast<uint32_t>(hipMemRangeAttributeLastPrefetchLocation) ==
hipError_t hipMallocManaged(void** dev_ptr, size_t size, unsigned int flags) {
HIP_INIT_API(hipMallocManaged, dev_ptr, size, flags);
CHECK_STREAM_CAPTURE_SUPPORTED();
if ((dev_ptr == nullptr) || (size == 0) ||
((flags != hipMemAttachGlobal) && (flags != hipMemAttachHost))) {
HIP_RETURN(hipErrorInvalidValue);