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: 7239172265]
このコミットが含まれているのは:
foreman
2016-09-12 23:08:18 -04:00
コミット 322917f699
+9
ファイルの表示
@@ -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"));