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
Этот коммит содержится в:
@@ -397,7 +397,7 @@ char* Device::getExtensionString() {
|
||||
return result;
|
||||
}
|
||||
|
||||
#if defined(WITH_LIGHTNING_COMPILER)
|
||||
#if defined(WITH_LIGHTNING_COMPILER) || defined(USE_COMGR_LIBRARY)
|
||||
CacheCompilation::CacheCompilation(std::string targetStr, std::string postfix, bool enableCache,
|
||||
bool resetCache)
|
||||
: codeCache_(targetStr, 0, AMD_PLATFORM_BUILD_NUMBER, postfix),
|
||||
@@ -482,11 +482,13 @@ bool CacheCompilation::compileToLLVMBitcode(amd::opencl_driver::Compiler* C,
|
||||
StringCache::CachedData cachedData = {bc->Ptr(), bc->Size()};
|
||||
bcSet.push_back(cachedData);
|
||||
} else if (input->Type() == DT_CL_HEADER) {
|
||||
#if !defined(USE_COMGR_LIBRARY)
|
||||
FileReference* bcFile = reinterpret_cast<FileReference*>(input);
|
||||
std::string bc;
|
||||
bcFile->ReadToString(bc);
|
||||
StringCache::CachedData cachedData = {bc.c_str(), bc.size()};
|
||||
bcSet.push_back(cachedData);
|
||||
#endif // !defined(USE_COMGR_LIBRARY)
|
||||
} else {
|
||||
buildLog += "Error: unsupported bitcode type for checking cache.\n";
|
||||
checkCache = false;
|
||||
@@ -564,7 +566,7 @@ bool CacheCompilation::compileAndLinkExecutable(amd::opencl_driver::Compiler* C,
|
||||
|
||||
return true;
|
||||
}
|
||||
#endif // defined(WITH_LIGHTNING_COMPILER)
|
||||
#endif // defined(WITH_LIGHTNING_COMPILER) || defined(USE_COMGR_LIBRARY)
|
||||
|
||||
} // namespace amd
|
||||
|
||||
|
||||
Ссылка в новой задаче
Block a user