P4 to Git Change 1717839 by gandryey@gera-w8 on 2018/12/07 17:54:13

SWDEV-162389 - Prepare the runtime code for enabling COMGR by default in the non-LC workspace
	- Make sure OCL runtime can dynamically switch between HSAIL and LC paths
	- For now use the both WITH_LIGHTNING_COMPILER and USE_COMGR_LIBRARY defines to identify LC specific code. The clean-up will come later

Affected files ...

... //depot/stg/opencl/drivers/opencl/runtime/device/device.cpp#236 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/device.hpp#325 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/devkernel.cpp#12 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/devkernel.hpp#8 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/devprogram.cpp#17 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/devprogram.hpp#10 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gpuresource.cpp#247 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/pal/paldevice.cpp#116 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palkernel.cpp#72 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palprogram.cpp#83 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palsettings.cpp#61 edit
... //depot/stg/opencl/drivers/opencl/runtime/platform/program.cpp#99 edit
This commit is contained in:
foreman
2018-12-07 18:30:39 -05:00
parent 855c65b06b
commit 03d5d4b485
12 changed files with 97 additions and 95 deletions
+6 -6
View File
@@ -19,10 +19,10 @@
#include "devkernel.hpp"
#include "amdocl/cl_profile_amd.h"
#if defined(WITH_LIGHTNING_COMPILER)
#if defined(WITH_LIGHTNING_COMPILER) || defined(USE_COMGR_LIBRARY)
#include "caching/cache.hpp"
#include "driver/AmdCompiler.h"
#endif // defined(WITH_LIGHTNING_COMPILER)
#endif // defined(WITH_LIGHTNING_COMPILER) || defined(USE_COMGR_LIBRARY)
#include "acl.h"
#include "hwdebug.hpp"
@@ -1308,7 +1308,7 @@ class Device : public RuntimeObject {
// P2P devices that are accessible from the current device
std::vector<cl_device_id> p2pDevices_;
#if defined(WITH_LIGHTNING_COMPILER)
#if defined(WITH_LIGHTNING_COMPILER) || defined(USE_COMGR_LIBRARY)
amd::CacheCompilation* cacheCompilation() const { return cacheCompilation_.get(); }
#endif
@@ -1322,7 +1322,7 @@ class Device : public RuntimeObject {
BlitProgram* blitProgram_; //!< Blit program info
static AppProfile appProfile_; //!< application profile
HwDebugManager* hwDebugMgr_; //!< Hardware Debug manager
#if defined(WITH_LIGHTNING_COMPILER)
#if defined(WITH_LIGHTNING_COMPILER) || defined(USE_COMGR_LIBRARY)
//! Compilation with cache support
std::unique_ptr<amd::CacheCompilation> cacheCompilation_;
#endif
@@ -1340,7 +1340,7 @@ class Device : public RuntimeObject {
std::map<uintptr_t, device::Memory*>* vaCacheMap_; //!< VA cache map
};
#if defined(WITH_LIGHTNING_COMPILER)
#if defined(WITH_LIGHTNING_COMPILER) || defined(USE_COMGR_LIBRARY)
//! Compilation process with cache support.
class CacheCompilation : public amd::HeapObject {
public:
@@ -1377,7 +1377,7 @@ class CacheCompilation : public amd::HeapObject {
StringCache codeCache_; //! Cached codes
const bool isCodeCacheEnabled_; //! Code cache enable
};
#endif // defined(WITH_LIGHTNING_COMPILER)
#endif // defined(WITH_LIGHTNING_COMPILER) || defined(USE_COMGR_LIBRARY)
/*! @}
* @}