P4 to Git Change 1223703 by nhaustov@nhaustov_hsa on 2015/12/28 05:46:00

SWDEV-77584 - Fix ocl_conformance compiler failures.

	1. If compiling in debug mode, linkImpl wasn't called and kernelNames wasn't set
	which led to CL_INVALID_KERNEL_NAME errors in debug configs in TeamCity. Looking at AMDIL
	code, there is no reason to skip linkImpl in debug mode.

	2. Set types to TYPE_LIBRARY/TYPE_EXECUTABLE. This fixes ocl_conformance compiler program_binary_type.

	Reviewed by: Evgeniy Mankov
	Testing: smoke, pre-checkin, OCLSeparateCompile.

Affected files ...

... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gpuprogram.cpp#218 edit
Цей коміт міститься в:
foreman
2015-12-28 05:53:39 -05:00
джерело cfc2b489df
коміт b4f5366fe4
+3 -1
Переглянути файл
@@ -1862,12 +1862,13 @@ HSAILProgram::linkImpl(
for (size_t i = 1; i < binaries_to_link.size(); i++) {
aclBinaryFini(binaries_to_link[i]);
}
if (createLibrary || options->oVariables->EnableDebug) {
if (createLibrary) {
size_t size = 0;
void *mem = NULL;
aclWriteToMem(binaryElf_, &mem, &size);
setBinary(static_cast<char*>(mem), size);
buildLog_ += aclGetCompilerLog(dev().hsaCompiler());
setType(TYPE_LIBRARY);
return true;
}
// Now call linkImpl with the new options
@@ -2231,6 +2232,7 @@ HSAILProgram::linkImpl(amd::option::Options* options)
aclWriteToMem(binaryElf_, &mem, &size);
setBinary(static_cast<char*>(mem), size);
buildLog_ += aclGetCompilerLog(dev().hsaCompiler());
setType(TYPE_EXECUTABLE);
return true;
}