From 121dddd18815dbeffb73ee556cba771a1d648112 Mon Sep 17 00:00:00 2001
From: foreman
Date: Thu, 1 Aug 2019 12:06:04 -0400
Subject: [PATCH] P4 to Git Change 1977018 by cpaquot@cpaquot-ocl-lc-lnx on
2019/08/01 11:58:59
SWDEV-197462 - [HIP] Add HIP_INIT_API to hipFree to initialize current thread.
Affected files ...
... //depot/stg/opencl/drivers/opencl/api/hip/hip_memory.cpp#64 edit
[ROCm/hip commit: ed497989b90d05cebd8728f20a6f0579232eaa70]
---
projects/hip/api/hip/hip_memory.cpp | 2 ++
1 file changed, 2 insertions(+)
diff --git a/projects/hip/api/hip/hip_memory.cpp b/projects/hip/api/hip/hip_memory.cpp
index c3755cf028..46d84b8520 100644
--- a/projects/hip/api/hip/hip_memory.cpp
+++ b/projects/hip/api/hip/hip_memory.cpp
@@ -240,6 +240,8 @@ hipError_t hipHostMalloc(void** ptr, size_t sizeBytes, unsigned int flags) {
}
hipError_t hipFree(void* ptr) {
+ HIP_INIT_API(ptr);
+
if (ptr == nullptr) {
HIP_RETURN(hipSuccess);
}