P4 to Git Change 1207850 by emankov@em-hsa-amd on 2015/11/05 06:54:22

SWDEV-77584 - ORCA RT: Preparations for enabling HSAIL on OpenCL 1.2 by default. Restore setBinary while linking GPU program.

	After CL 1205315 "Call aclLink always even for single library/binary." setting OCL Binary should work without setting library type for the program by setType(TYPE_LIBRARY).

	[Testing] pre check-in
	http://ocltc.amd.com:8111/viewModification.html?modId=61694&personal=true&buildTypeId=&tab=vcsModificationBuilds&show_all_builds=true

	[Reviewer] German Andryeyev
	http://ocltc.amd.com/reviews/r/8850

Affected files ...

... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gpuprogram.cpp#214 edit
Esse commit está contido em:
foreman
2015-11-05 07:02:25 -05:00
commit 3e4332a85f
+8 -14
Ver Arquivo
@@ -1848,20 +1848,14 @@ HSAILProgram::linkImpl(
for (size_t i = 1; i < binaries_to_link.size(); i++) {
aclBinaryFini(binaries_to_link[i]);
}
// Uncomment when CL1.2 support on HSAIL is enabled,
// Otherwise ocltst's OCLSeparateCompile will fail
// on the non-legacy path with CL1.2
// if (createLibrary || options->oVariables->EnableDebug) {
// // Save the binary in the interface class
// size_t size = 0;
// void *mem = NULL;
// aclWriteToMem(binaryElf_, &mem, &size);
// setBinary(static_cast<char*>(mem), size);
// if (createLibrary)
// setType(TYPE_LIBRARY);
// buildLog_ += aclGetCompilerLog(dev().hsaCompiler());
// return true;
// }
if (createLibrary || options->oVariables->EnableDebug) {
size_t size = 0;
void *mem = NULL;
aclWriteToMem(binaryElf_, &mem, &size);
setBinary(static_cast<char*>(mem), size);
buildLog_ += aclGetCompilerLog(dev().hsaCompiler());
return true;
}
// Now call linkImpl with the new options
return linkImpl(options);
}