P4 to Git Change 1753035 by wchau@wchau_OCL_Linux on 2019/03/07 15:02:39

SWDEV-182054 - Allow building OpenCL-Runtime with COMGR enabled without OpenCL-Driver being present

Affected files ...

... //depot/stg/opencl/drivers/opencl/api/hip/build/Makefile.hip#12 edit
... //depot/stg/opencl/drivers/opencl/api/opencl/amdocl/build/Makefile.api#184 edit
... //depot/stg/opencl/drivers/opencl/compiler/Makefile#71 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/device.cpp#242 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/device.hpp#335 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/devprogram.cpp#30 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/devprogram.hpp#18 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/pal/paldevice.cpp#126 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palprogram.cpp#87 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/rocm/rocdevice.cpp#120 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/rocm/rockernel.cpp#51 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/rocm/rocprogram.cpp#100 edit
Este commit está contenido en:
foreman
2019-03-07 15:48:33 -05:00
padre 2df067619f
commit e51a27e182
Se han modificado 9 ficheros con 32 adiciones y 23 borrados
+4 -6
Ver fichero
@@ -12,7 +12,9 @@
#include "utils/libUtils.h"
#if defined(WITH_LIGHTNING_COMPILER) || defined(USE_COMGR_LIBRARY)
#ifndef USE_COMGR_LIBRARY
#include "driver/AmdCompiler.h"
#endif
#include "libraries.amdgcn.inc"
#include "opencl1.2-c.amdgcn.inc"
#include "opencl2.0-c.amdgcn.inc"
@@ -161,6 +163,7 @@ static void checkLLVM_BIN() {
}
#endif // defined(ATI_OS_LINUX)
#if !defined(USE_COMGR_LIBRARY)
std::unique_ptr<amd::opencl_driver::Compiler> Program::newCompilerInstance() {
#if defined(ATI_OS_WIN)
static INIT_ONCE initOnce;
@@ -178,13 +181,10 @@ std::unique_ptr<amd::opencl_driver::Compiler> Program::newCompilerInstance() {
}
#endif // defined(DEBUG)
#if !defined(USE_COMGR_LIBRARY)
return std::unique_ptr<amd::opencl_driver::Compiler>(
amd::opencl_driver::CompilerFactory().CreateAMDGPUCompiler(llvmBin_));
#else
return std::unique_ptr<amd::opencl_driver::Compiler>(nullptr);
#endif // !defined(USE_COMGR_LIBRARY)
}
#endif // !defined(USE_COMGR_LIBRARY)
#endif // defined(WITH_LIGHTNING_COMPILER) || defined(USE_COMGR_LIBRARY)
// ================================================================================================
@@ -1082,8 +1082,6 @@ bool Program::linkImpl(const std::vector<device::Program*>& inputPrograms,
#if defined(USE_COMGR_LIBRARY)
bool Program::linkImplLC(const std::vector<Program*>& inputPrograms,
amd::option::Options* options, bool createLibrary) {
using namespace amd::opencl_driver;
std::unique_ptr<Compiler> C(newCompilerInstance());
amd_comgr_data_set_t inputs;