From aa251eeae41a6e8d1dc71eb58b90cda942c1d62b Mon Sep 17 00:00:00 2001
From: foreman
Date: Thu, 22 Jun 2017 13:52:33 -0400
Subject: [PATCH] P4 to Git Change 1425751 by gandryey@gera-w8 on 2017/06/22
13:46:26
SWDEV-79445 - OCL generic changes and code clean-up
- Fix for LiquidFlash. Add different condition for Linux build detection
Affected files ...
... //depot/stg/opencl/drivers/opencl/runtime/build/Makefile.runtime#68 edit
... //depot/stg/opencl/drivers/opencl/runtime/platform/context.cpp#44 edit
[ROCm/clr commit: f71a338de7a64bb2c90b243647e00496f0c11385]
---
projects/clr/rocclr/runtime/platform/context.cpp | 15 +++++++++++----
1 file changed, 11 insertions(+), 4 deletions(-)
diff --git a/projects/clr/rocclr/runtime/platform/context.cpp b/projects/clr/rocclr/runtime/platform/context.cpp
index 851e370fb1..21ab9bb29e 100644
--- a/projects/clr/rocclr/runtime/platform/context.cpp
+++ b/projects/clr/rocclr/runtime/platform/context.cpp
@@ -18,6 +18,11 @@
#include "CL/cl_dx9_media_sharing.h"
#endif //_WIN32
+#if (!defined(BUILD_HSA_TARGET) && defined(WITH_HSA_DEVICE) && \
+ defined(WITH_AMDGPU_PRO)) || defined(_WIN32)
+#include "lf.h"
+#endif
+
namespace amd {
Context::Context(const std::vector& devices, const Info& info)
@@ -75,9 +80,10 @@ Context::~Context() {
std::for_each(devices_.begin(), devices_.end(), std::mem_fun(&Device::release));
-#if defined WITH_LIQUID_FLASH
+#if (!defined(BUILD_HSA_TARGET) && defined(WITH_HSA_DEVICE) && \
+ defined(WITH_AMDGPU_PRO)) || defined(_WIN32)
lfTerminate();
-#endif // WITH_LIQUID_FLASH
+#endif
}
int Context::checkProperties(const cl_context_properties* properties, Context::Info* info) {
@@ -257,9 +263,10 @@ int Context::create(const intptr_t* properties) {
}
}
}
-#if defined WITH_LIQUID_FLASH
+#if (!defined(BUILD_HSA_TARGET) && defined(WITH_HSA_DEVICE) && \
+ defined(WITH_AMDGPU_PRO)) || defined(_WIN32)
lfInit();
-#endif // WITH_LIQUID_FLASH
+#endif
return result;
}