From b7a06efb6c79d6d152bdcef697fd82ac0c5f9f45 Mon Sep 17 00:00:00 2001 From: Rahul Garg Date: Fri, 13 Sep 2019 02:10:21 +0530 Subject: [PATCH] [HACK] Temporary fix for hipFree for hipManagedMalloc [ROCm/clr commit: 2e9b8e9d0de392b673a02fe6a18b1fe386857a79] --- projects/clr/hipamd/src/hip_memory.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/projects/clr/hipamd/src/hip_memory.cpp b/projects/clr/hipamd/src/hip_memory.cpp index 2deedbc635..c249c08d63 100644 --- a/projects/clr/hipamd/src/hip_memory.cpp +++ b/projects/clr/hipamd/src/hip_memory.cpp @@ -1989,7 +1989,8 @@ hipError_t hipFree(void* ptr) { #endif am_status_t status = hc::am_memtracker_getinfo(&amPointerInfo, ptr); if (status == AM_SUCCESS) { - if (amPointerInfo._hostPointer == NULL) { + /*if (amPointerInfo._hostPointer == NULL) */ //TODO Fix this when there is proper Managed memeory support + { if (HIP_SYNC_FREE) { // Synchronize all devices, all streams // to ensure all work has finished on all devices.