P4 to Git Change 1989679 by gandryey@gera-win10 on 2019/08/27 11:34:19
SWDEV-200422 - Teamcity built OpenCL ignores all options from LC backend - Pass LC argument into parseAllOptions() http://ocltc.amd.com/reviews/r/17884/ Affected files ... ... //depot/stg/opencl/drivers/opencl/compiler/lib/api/v0_8/acl.cpp#50 edit ... //depot/stg/opencl/drivers/opencl/compiler/lib/utils/options.cpp#46 edit ... //depot/stg/opencl/drivers/opencl/compiler/lib/utils/options.hpp#22 edit ... //depot/stg/opencl/drivers/opencl/compiler/lib/utils/v0_8/libUtils.cpp#42 edit ... //depot/stg/opencl/drivers/opencl/runtime/device/devprogram.cpp#62 edit ... //depot/stg/opencl/drivers/opencl/runtime/platform/program.cpp#103 edit ... //depot/stg/opencl/drivers/opencl/runtime/platform/program.hpp#47 edit
This commit is contained in:
@@ -112,7 +112,7 @@ cl_int Program::addDeviceProgram(Device& device, const void* image, size_t lengt
|
||||
// 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)) {
|
||||
if (!amd::option::parseAllOptions(sBinOptions, *options, false, false)) {
|
||||
programLog_ = options->optionsLog();
|
||||
LogError("Parsing compilation options from binary failed.");
|
||||
return CL_INVALID_COMPILER_OPTIONS;
|
||||
@@ -155,7 +155,7 @@ cl_int Program::addDeviceProgram(Device& device, const void* image, size_t lengt
|
||||
// load the compiler options from the binary if it is not provided
|
||||
std::string sBinOptions = program->compileOptions();
|
||||
if (!sBinOptions.empty() && emptyOptions) {
|
||||
if (!amd::option::parseAllOptions(sBinOptions, *options)) {
|
||||
if (!amd::option::parseAllOptions(sBinOptions, *options, false, isLC())) {
|
||||
programLog_ = options->optionsLog();
|
||||
LogError("Parsing compilation options from binary failed.");
|
||||
return CL_INVALID_COMPILER_OPTIONS;
|
||||
@@ -595,7 +595,7 @@ int Program::GetOclCVersion(const char* clVer) {
|
||||
}
|
||||
|
||||
bool Program::ParseAllOptions(const std::string& options, option::Options& parsedOptions,
|
||||
bool optionChangable, bool linkOptsOnly) {
|
||||
bool optionChangable, bool linkOptsOnly, bool isLC) {
|
||||
std::string allOpts = options;
|
||||
if (optionChangable) {
|
||||
if (linkOptsOnly) {
|
||||
@@ -622,7 +622,7 @@ bool Program::ParseAllOptions(const std::string& options, option::Options& parse
|
||||
}
|
||||
}
|
||||
}
|
||||
return amd::option::parseAllOptions(allOpts, parsedOptions, linkOptsOnly);
|
||||
return amd::option::parseAllOptions(allOpts, parsedOptions, linkOptsOnly, isLC);
|
||||
}
|
||||
|
||||
bool Symbol::setDeviceKernel(const Device& device, const device::Kernel* func) {
|
||||
|
||||
مرجع در شماره جدید
Block a user