P4 to Git Change 1228888 by avolkov@spb-hlc-kv25_opencl_stgsc on 2016/01/19 10:49:38
SWDEV-83192 - [CQE OCL][2.0][QR] Few MCLSubtests are falling due to faulty cl#1208929
[Synopsis]
Failure is because of additional check on compilation options existence in binary, which are expected in a separate section in the input binary. Options are expected on HSAIL path in order to make a decision whether to recompile or not the input code. AMDIL path has another strategy for recompilation algorithm and doesn't need options to be obligatory presented in input binary.
[Solution]
Remove options existence check in the input binary when compiling from BINARY_TYPE_ELF.
P.S.
With the fix HSAIL path also doesnt require compilation options existence in input binary anymore. Recompilation will be done silently in such case.
[Testing]
Pre checkin, MCL
Reviewed by Evgeniy Mankov, Nikolay Haustov, German Andryeyev
http://ocltc.amd.com/reviews/r/9560/
Affected files ...
... //depot/stg/opencl/drivers/opencl/runtime/platform/program.cpp#77 edit
[ROCm/clr commit: 91bbd98a0b]
This commit is contained in:
@@ -86,20 +86,16 @@ 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 (errorCode != ACL_SUCCESS) {
|
||||
if (emptyOptions) {
|
||||
options = NULL;
|
||||
if (opts != NULL) {
|
||||
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;
|
||||
}
|
||||
return CL_INVALID_BINARY;
|
||||
}
|
||||
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;
|
||||
}
|
||||
options->oVariables->Legacy = isAMDILTarget(*aclutGetTargetInfo(binary));
|
||||
}
|
||||
|
||||
Viittaa uudesa ongelmassa
Block a user