P4 to Git Change 1520850 by kzhuravl@kzhuravl-fiji-ocllc on 2018/02/28 13:01:41
SWDEV-129762 - Remove following macros that are passed through the command line to the lightning compiler: -D__AMD__=1 -D__devicename=1 -D__devicename__=1 -DFP_FAST_FMA=1 -DFP_FAST_FMAF=1 Affected files ... ... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palprogram.cpp#54 edit ... //depot/stg/opencl/drivers/opencl/runtime/device/rocm/rocprogram.cpp#79 edit
This commit is contained in:
@@ -714,10 +714,12 @@ void HSAILProgram::releaseClBinary() {
|
||||
std::string HSAILProgram::hsailOptions(amd::option::Options* options) {
|
||||
std::string hsailOptions;
|
||||
|
||||
#ifndef WITH_LIGHTNING_COMPILER
|
||||
hsailOptions.append(" -D__AMD__=1");
|
||||
|
||||
hsailOptions.append(" -D__").append(device().info().name_).append("__=1");
|
||||
hsailOptions.append(" -D__").append(device().info().name_).append("=1");
|
||||
#endif
|
||||
|
||||
int major, minor;
|
||||
::sscanf(device().info().version_, "OpenCL %d.%d ", &major, &minor);
|
||||
@@ -732,6 +734,7 @@ std::string HSAILProgram::hsailOptions(amd::option::Options* options) {
|
||||
hsailOptions.append(" -D__IMAGE_SUPPORT__=1");
|
||||
}
|
||||
|
||||
#ifndef WITH_LIGHTNING_COMPILER
|
||||
// Set options for the standard device specific options
|
||||
// All our devices support these options now
|
||||
if (dev().settings().reportFMAF_) {
|
||||
@@ -740,6 +743,7 @@ std::string HSAILProgram::hsailOptions(amd::option::Options* options) {
|
||||
if (dev().settings().reportFMA_) {
|
||||
hsailOptions.append(" -DFP_FAST_FMA=1");
|
||||
}
|
||||
#endif
|
||||
|
||||
uint clcStd =
|
||||
(options->oVariables->CLStd[2] - '0') * 100 + (options->oVariables->CLStd[4] - '0') * 10;
|
||||
|
||||
@@ -312,10 +312,12 @@ std::string Program::preprocessorOptions(amd::option::Options* options) {
|
||||
|
||||
// Set options for the standard device specific options
|
||||
|
||||
#ifndef WITH_LIGHTNING_COMPILER
|
||||
optionsStr.append(" -D__AMD__=1");
|
||||
|
||||
optionsStr.append(" -D__").append(device().info().name_).append("__=1");
|
||||
optionsStr.append(" -D__").append(device().info().name_).append("=1");
|
||||
#endif
|
||||
|
||||
int major, minor;
|
||||
::sscanf(device().info().version_, "OpenCL %d.%d ", &major, &minor);
|
||||
@@ -328,6 +330,7 @@ std::string Program::preprocessorOptions(amd::option::Options* options) {
|
||||
optionsStr.append(" -D__IMAGE_SUPPORT__=1");
|
||||
}
|
||||
|
||||
#ifndef WITH_LIGHTNING_COMPILER
|
||||
// This is just for legacy compiler code
|
||||
// All our devices support these options now
|
||||
if (options->oVariables->FastFMA) {
|
||||
@@ -336,6 +339,7 @@ std::string Program::preprocessorOptions(amd::option::Options* options) {
|
||||
if (options->oVariables->FastFMAF) {
|
||||
optionsStr.append(" -DFP_FAST_FMAF=1");
|
||||
}
|
||||
#endif
|
||||
|
||||
uint clcStd =
|
||||
(options->oVariables->CLStd[2] - '0') * 100 + (options->oVariables->CLStd[4] - '0') * 10;
|
||||
|
||||
مرجع در شماره جدید
Block a user