P4 to Git Change 1752541 by wchau@wchau_OCL_Linux on 2019/03/06 17:02:07
SWDEV-168145 - Add ECC target feature to OpenCL runtime Affected files ... ... //depot/stg/opencl/drivers/opencl/runtime/device/device.hpp#334 edit ... //depot/stg/opencl/drivers/opencl/runtime/device/devprogram.cpp#29 edit ... //depot/stg/opencl/drivers/opencl/runtime/device/devprogram.hpp#17 edit ... //depot/stg/opencl/drivers/opencl/runtime/device/pal/paldevice.cpp#125 edit ... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palprogram.cpp#86 edit ... //depot/stg/opencl/drivers/opencl/runtime/device/rocm/rocdevice.cpp#119 edit ... //depot/stg/opencl/drivers/opencl/runtime/device/rocm/rocdevice.hpp#35 edit ... //depot/stg/opencl/drivers/opencl/runtime/device/rocm/rockernel.cpp#50 edit ... //depot/stg/opencl/drivers/opencl/runtime/device/rocm/rocprogram.cpp#99 edit
This commit is contained in:
@@ -336,6 +336,9 @@ void Program::setLangAndTargetStr(const char* clStd, amd_comgr_language_t* oclve
|
||||
if (xnackEnabled_) {
|
||||
targetIdent.append("+xnack");
|
||||
}
|
||||
if (sramEccEnabled_) {
|
||||
targetIdent.append("+sram-ecc");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -810,6 +813,14 @@ bool Program::compileImplLC(const std::string& sourceCode,
|
||||
driverOptions.append(" -mxnack");
|
||||
}
|
||||
|
||||
// Set SRAM ECC option if needed
|
||||
if (sramEccEnabled_) {
|
||||
driverOptions.append(" -msram-ecc");
|
||||
}
|
||||
else {
|
||||
driverOptions.append(" -mno-sram-ecc");
|
||||
}
|
||||
|
||||
driverOptions.append(options->llvmOptions);
|
||||
driverOptions.append(ProcessOptions(options));
|
||||
|
||||
@@ -1692,6 +1703,14 @@ bool Program::linkImplLC(amd::option::Options* options) {
|
||||
codegenOptions.append(" -mxnack");
|
||||
}
|
||||
|
||||
// Set SRAM ECC option if needed
|
||||
if (sramEccEnabled_) {
|
||||
codegenOptions.append(" -msram-ecc");
|
||||
}
|
||||
else {
|
||||
codegenOptions.append(" -mno-sram-ecc");
|
||||
}
|
||||
|
||||
// Set the -O#
|
||||
std::ostringstream optLevel;
|
||||
optLevel << "-O" << options->oVariables->OptLevel;
|
||||
|
||||
Reference in New Issue
Block a user