P4 to Git Change 1229520 by fdaniil@spb_fdaniil_amd_hsa_brigvar_test on 2016/01/20 17:01:23

SWDEV-82159 - [CQE OCL][ISV][QR] Error is observed while debugging the sample with CodeXL; Faulty CL:1208929

	[Synopsis]
	compile from binary logic changes caused issue with resulting binary generation in CodeXL

	[Solution]
	do not use compile options from binary if they are explicitly specified

	[Testing]
	precheckin, MCL
	Reviewed by Evgeniy Mankov, German Andryeyev

Affected files ...

... //depot/stg/opencl/drivers/opencl/runtime/platform/program.cpp#78 edit
このコミットが含まれているのは:
foreman
2016-01-20 17:10:22 -05:00
コミット 22b26ca387
+2 -10
ファイルの表示
@@ -75,9 +75,6 @@ Program::addDeviceProgram(Device& device, const void* image, size_t length,
acl_error errorCode;
aclBinary *binary = aclReadFromMem(image, length, &errorCode);
if (errorCode != ACL_SUCCESS) {
if (emptyOptions) {
options = NULL;
}
return CL_INVALID_BINARY;
}
const oclBIFSymbolStruct* symbol = findBIF30SymStruct(symOpenclCompilerOptions);
@@ -86,14 +83,12 @@ Program::addDeviceProgram(Device& device, const void* image, size_t length,
size_t symSize = 0;
const void *opts = aclExtractSymbol(device.compiler(),
binary, &symSize, aclCOMMENT, symName.c_str(), &errorCode);
if (opts != NULL) {
// if we have options from binary and input options was not specified
if (opts != NULL && emptyOptions) {
std::string sBinOptions = std::string((char*)opts, symSize);
if (!amd::option::parseAllOptions(sBinOptions, *options)) {
programLog_ = options->optionsLog();
LogError("Parsing compilation options from binary failed.");
if (emptyOptions) {
options = NULL;
}
return CL_INVALID_COMPILER_OPTIONS;
}
}
@@ -101,9 +96,6 @@ Program::addDeviceProgram(Device& device, const void* image, size_t length,
}
options->oVariables->BinaryIsSpirv = isSPIRV_;
device::Program* program = rootDev.createProgram(options);
if (emptyOptions) {
options = NULL;
}
if (program == NULL) {
return CL_OUT_OF_HOST_MEMORY;
}