P4 to Git Change 1313945 by wchau@wchau_OCL_boltzmann on 2016/09/13 15:57:45

SWDEV-94605 - [OCL-LC-ROCm] ability to load offline (and online) generated binaries using the HSA code object format

Affected files ...

... //depot/stg/opencl/drivers/opencl/runtime/device/device.cpp#203 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/rocm/roccompiler.cpp#17 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/rocm/rocprogram.cpp#35 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/rocm/rocprogram.hpp#14 edit
... //depot/stg/opencl/drivers/opencl/runtime/platform/program.cpp#83 edit
Este commit está contenido en:
foreman
2016-09-13 16:16:35 -04:00
padre a1009a5d11
commit 0495f895a2
Se han modificado 5 ficheros con 128 adiciones y 55 borrados
+22 -1
Ver fichero
@@ -1304,6 +1304,27 @@ Program::setBinary(char* binaryIn, size_t size)
clBinary()->loadCompileOptions(compileOptions_);
clBinary()->loadLinkOptions(linkOptions_);
#if defined(WITH_LIGHTNING_COMPILER)
//TODO: Remove this once BIF is no longer used as we should have a machinasm in
// place to get the binary type correctly from above.
// It is a workaround for executable build from the library. The code object
// binary does not have the type information.
char *sect = NULL;
size_t sz = 0;
if (clBinary()->elfIn()->getSection(amd::OclElf::TEXT, &sect, &sz) && sect && sz > 0) {
setType(TYPE_EXECUTABLE);
}
sect = NULL;
sz = 0;
if (type != ET_DYN && // binary is not a library
(clBinary()->elfIn()->getSection(amd::OclElf::LLVMIR, &sect, &sz) && sect && sz > 0))
{
setType(TYPE_COMPILED);
}
#endif
clBinary()->resetElfIn();
return true;
}
@@ -1312,7 +1333,7 @@ bool
Program::createBIFBinary(aclBinary* bin)
{
#if defined(WITH_LIGHTNING_COMPILER)
assert(!"FIXME_Wilkin");
assert(!"createBIFBinary() should not be called when using LC");
return false;
#else // defined(WITH_LIGHTNING_COMPILER)
acl_error err;