P4 to Git Change 1203838 by emankov@em-hsa-amd on 2015/10/26 11:43:45
SWDEV-77584 - ORCA RT: Preparations for enabling HSAIL on OpenCL 1.2 by default. Error handling for parseAllOptions.
[Testing] pre check-in
[Reviewer] German Andryeyev
http://ocltc.amd.com/reviews/r/8800/
Affected files ...
... //depot/stg/opencl/drivers/opencl/runtime/device/device.cpp#188 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gpuprogram.cpp#212 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/hsa_foundation/hsaprogram.cpp#21 edit
[ROCm/clr commit: d8de9d4adc]
This commit is contained in:
@@ -770,7 +770,11 @@ cl_int Program::link(const std::vector<Program*>& inputPrograms,
|
||||
}
|
||||
}
|
||||
else {
|
||||
amd::option::parseAllOptions(compileOptions_, options);
|
||||
if (!amd::option::parseAllOptions(compileOptions_, options)) {
|
||||
buildStatus_ = CL_BUILD_ERROR;
|
||||
buildLog_ += options.optionsLog();
|
||||
LogError("Parsing compile options failed.");
|
||||
}
|
||||
}
|
||||
|
||||
uint64_t start_time = 0;
|
||||
@@ -972,7 +976,7 @@ Program::getCompileOptionsAtLinking(const std::vector<Program*>& inputPrograms,
|
||||
if (!amd::option::parseAllOptions(program->compileOptions_,
|
||||
*thisCompileOptions)) {
|
||||
buildLog_ += thisCompileOptions->optionsLog();
|
||||
LogError("Bad compile options from input binary");
|
||||
LogError("Parsing compile options failed.");
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -993,7 +997,7 @@ Program::getCompileOptionsAtLinking(const std::vector<Program*>& inputPrograms,
|
||||
if (!amd::option::parseLinkOptions(program->linkOptions_,
|
||||
thisLinkOptions)) {
|
||||
buildLog_ += thisLinkOptions.optionsLog();
|
||||
LogError("Bad link options from input binary");
|
||||
LogError("Parsing link options failed.");
|
||||
return false;
|
||||
}
|
||||
if (thisLinkOptions.oVariables->clEnableLinkOptions)
|
||||
@@ -1002,7 +1006,7 @@ Program::getCompileOptionsAtLinking(const std::vector<Program*>& inputPrograms,
|
||||
if (linkOptsCanOverwrite) {
|
||||
if (!thisCompileOptions->setOptionVariablesAs(*linkOptions)) {
|
||||
buildLog_ += thisCompileOptions->optionsLog();
|
||||
LogError("Bad compile options from input binary");
|
||||
LogError("Setting link options failed.");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user