From 322917f699d95fc7b8b01743939f106887f604f6 Mon Sep 17 00:00:00 2001 From: foreman Date: Mon, 12 Sep 2016 23:08:18 -0400 Subject: [PATCH] P4 to Git Change 1313559 by lmoriche@lmoriche_opencl_dev on 2016/09/12 22:58:58 SWDEV-94610 - Don't use the -cl-denorms-are-zero, but instead set the fp32/fp64 denorms with the target features +fp32-denormals and +fp64-denormals. fp64-denormals is always set, fp32-denormals in only set if device >= gfx900 and -cl-denorms-are-zero is not set. Affected files ... ... //depot/stg/opencl/drivers/opencl/runtime/device/rocm/rocprogram.cpp#33 edit [ROCm/clr commit: 7239172265716bd0f686d8ac09e97b71edb39a4b] --- projects/clr/rocclr/runtime/device/rocm/rocprogram.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/projects/clr/rocclr/runtime/device/rocm/rocprogram.cpp b/projects/clr/rocclr/runtime/device/rocm/rocprogram.cpp index 8c384b9c8b..0ad5db81d1 100644 --- a/projects/clr/rocclr/runtime/device/rocm/rocprogram.cpp +++ b/projects/clr/rocclr/runtime/device/rocm/rocprogram.cpp @@ -1438,9 +1438,18 @@ HSAILProgram::codegenOptions(amd::option::Options* options) { std::string optionsStr; +#if defined(WITH_LIGHTNING_COMPILER) + bool fp32Denormals = !options->oVariables->DenormsAreZero + && dev().deviceInfo().gfxipVersion_ >= 900; + + optionsStr.append(" -Xclang -target-feature -Xclang "); + optionsStr.append(fp32Denormals ? "+" : "-") + .append("fp32-denormals,+fp64-denormals"); +#else // !defined(WITH_LIGHTNING_COMPILER) if (dev().deviceInfo().gfxipVersion_ < 900) { optionsStr.append(" -cl-denorms-are-zero"); } +#endif // !defined(WITH_LIGHTNING_COMPILER) //check if the host is 64 bit or 32 bit LP64_ONLY(optionsStr.append(" -m64"));