P4 to Git Change 1303140 by lmoriche@lmoriche_opencl_dev on 2016/08/15 17:04:37
SWDEV-94610 - Code provided by Wilkin - Implement the roc Program Manager to call the Lightning Compiler instead of the compiler library. - Embed and use the pre-compiled header generated by the built-in library build - If LLVM_BIN is not set, try to find Clang from the libamdocl path Testing: http://ocltc.amd.com:8111/viewModification.html?modId=75068&personal=true&buildTypeId=&tab=vcsModificationBuilds&show_all_builds=true Affected files ... ... //depot/stg/opencl/drivers/opencl/compiler/lib/loaders/elf/elf.cpp#35 edit ... //depot/stg/opencl/drivers/opencl/compiler/lib/loaders/elf/elf.hpp#24 edit ... //depot/stg/opencl/drivers/opencl/runtime/device/blitcl.cpp#9 edit ... //depot/stg/opencl/drivers/opencl/runtime/device/device.cpp#200 edit ... //depot/stg/opencl/drivers/opencl/runtime/device/rocm/build/Makefile.oclrocm#7 edit ... //depot/stg/opencl/drivers/opencl/runtime/device/rocm/roccompiler.cpp#5 edit ... //depot/stg/opencl/drivers/opencl/runtime/device/rocm/rocdevice.cpp#7 edit ... //depot/stg/opencl/drivers/opencl/runtime/device/rocm/rockernel.cpp#5 edit ... //depot/stg/opencl/drivers/opencl/runtime/device/rocm/rockernel.hpp#4 edit ... //depot/stg/opencl/drivers/opencl/runtime/device/rocm/rocmetadata.cpp#1 add ... //depot/stg/opencl/drivers/opencl/runtime/device/rocm/rocmetadata.hpp#1 add ... //depot/stg/opencl/drivers/opencl/runtime/device/rocm/rocprogram.cpp#7 edit ... //depot/stg/opencl/drivers/opencl/runtime/device/rocm/rocprogram.hpp#5 edit ... //depot/stg/opencl/drivers/opencl/runtime/device/rocm/rocvirtual.cpp#8 edit ... //depot/stg/opencl/drivers/opencl/runtime/platform/program.cpp#81 edit
This commit is contained in:
@@ -49,7 +49,10 @@ Program::addDeviceProgram(Device& device, const void* image, size_t length,
|
||||
amd::option::Options* options)
|
||||
{
|
||||
#if defined(WITH_LIGHTNING_COMPILER)
|
||||
if (image != NULL) { assert(!"FIMXE_Wilkins: check the code below"); }
|
||||
// LC binary must be in ELF format
|
||||
if (image != NULL && !amd::isElfMagic((const char *) image)) {
|
||||
return CL_INVALID_BINARY;
|
||||
}
|
||||
#else // !defined(WITH_LIGHTNING_COMPILER)
|
||||
if (image != NULL &&
|
||||
!aclValidateBinaryImage(image, length,
|
||||
@@ -76,7 +79,10 @@ Program::addDeviceProgram(Device& device, const void* image, size_t length,
|
||||
emptyOptions = true;
|
||||
}
|
||||
#if defined(WITH_LIGHTNING_COMPILER)
|
||||
if (image != NULL && length != 0) { assert(!"FIMXE_Wilkins: check the code below"); }
|
||||
if (image != NULL && length != 0 && amd::isElfMagic((const char *) image)) {
|
||||
assert(!"FIMXE_Wilkins: check the code below");
|
||||
return CL_INVALID_BINARY;
|
||||
}
|
||||
#else // !defined(WITH_LIGHTNING_COMPILER)
|
||||
if (image != NULL && length != 0 && aclValidateBinaryImage(image, length, BINARY_TYPE_ELF)) {
|
||||
acl_error errorCode;
|
||||
@@ -99,9 +105,7 @@ Program::addDeviceProgram(Device& device, const void* image, size_t length,
|
||||
return CL_INVALID_COMPILER_OPTIONS;
|
||||
}
|
||||
}
|
||||
#if !defined(WITH_LIGHTNING_COMPILER)
|
||||
options->oVariables->Legacy = isAMDILTarget(*aclutGetTargetInfo(binary));
|
||||
#endif // !defined(WITH_LIGHTNING_COMPILER)
|
||||
}
|
||||
#endif // !defined(WITH_LIGHTNING_COMPILER)
|
||||
options->oVariables->BinaryIsSpirv = isSPIRV_;
|
||||
|
||||
Fai riferimento in un nuovo problema
Block a user