P4 to Git Change 1529710 by wchau@wchau_OCL_boltzmann on 2018/03/20 17:05:04
SWDEV-145760 - OCL on ROCm Support for respecting target's xnack setting (subtask of SWDEV-134107) Affected files ... ... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palcompiler.cpp#21 edit ... //depot/stg/opencl/drivers/opencl/runtime/device/pal/paldefs.hpp#34 edit ... //depot/stg/opencl/drivers/opencl/runtime/device/pal/paldevice.cpp#77 edit ... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palprogram.cpp#58 edit ... //depot/stg/opencl/drivers/opencl/runtime/device/rocm/roccompiler.cpp#41 edit ... //depot/stg/opencl/drivers/opencl/runtime/device/rocm/rocdefs.hpp#16 edit ... //depot/stg/opencl/drivers/opencl/runtime/device/rocm/rocdevice.cpp#84 edit ... //depot/stg/opencl/drivers/opencl/runtime/device/rocm/rocprogram.cpp#80 edit
Этот коммит содержится в:
@@ -245,7 +245,7 @@ aclType Program::getNextCompilationStageFromBinary(amd::option::Options* options
|
||||
break;
|
||||
}
|
||||
sBinOptions = std::string((char*)opts, symSize);
|
||||
} else
|
||||
} else
|
||||
#endif // defined(WITH_COMPILER_LIB)
|
||||
{
|
||||
sBinOptions = sCurOptions;
|
||||
@@ -1169,6 +1169,11 @@ bool LightningProgram::linkImpl(amd::option::Options* options) {
|
||||
codegenOptions.append(" -mcpu=");
|
||||
codegenOptions.append(dev().deviceInfo().machineTarget_);
|
||||
|
||||
// Set xnack option if needed
|
||||
if (dev().deviceInfo().xnackEnabled_) {
|
||||
codegenOptions.append(" -mxnack");
|
||||
}
|
||||
|
||||
// Set the -O#
|
||||
std::ostringstream optLevel;
|
||||
optLevel << "-O" << options->oVariables->OptLevel;
|
||||
|
||||
Ссылка в новой задаче
Block a user