P4 to Git Change 1397729 by kzhuravl@kzhuravl-fiji-ocllc on 2017/04/12 20:05:08

SWDEV-116535 - Report CL_FP_DENORM for single fp config for gfx9 for LC for rocm/pal and force denorms on based on AMD_GPU_FORCE_SINGLE_FP_DENORM for rocm.

Affected files ...

... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palsettings.cpp#23 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/rocm/rocdevice.cpp#47 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/rocm/rocprogram.cpp#62 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/rocm/rocsettings.cpp#16 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/rocm/rocsettings.hpp#7 edit


[ROCm/clr commit: c7e04f3222]
This commit is contained in:
foreman
2017-04-12 19:14:23 -05:00
parent ffdcf326f0
commit 8ca4c76180
5 changed files with 45 additions and 6 deletions
@@ -68,10 +68,13 @@ Settings::Settings()
const static size_t MaxPinnedXferSize = 32;
pinnedXferSize_ = std::min(GPU_PINNED_XFER_SIZE, MaxPinnedXferSize) * Mi;
pinnedMinXferSize_ = std::min(GPU_PINNED_MIN_XFER_SIZE * Ki, pinnedXferSize_);
// Don't support Denormals for single precision by default
singleFpDenorm_ = false;
}
bool
Settings::create(bool fullProfile)
Settings::create(bool fullProfile, int gfxipVersion)
{
customHostAllocator_ = false;
@@ -111,6 +114,14 @@ Settings::create(bool fullProfile)
enableExtension(ClKhrDepthImages);
supportDepthsRGB_ = true;
#if defined(WITH_LIGHTNING_COMPILER)
switch (gfxipVersion) {
case 900:
singleFpDenorm_ = true;
break;
}
#endif // WITH_LIGHTNING_COMPILER
// Override current device settings
override();
@@ -140,6 +151,19 @@ Settings::override()
if (!flagIsDefault(GPU_PINNED_MIN_XFER_SIZE)) {
pinnedMinXferSize_ = std::min(GPU_PINNED_MIN_XFER_SIZE * Ki, pinnedXferSize_);
}
if (!flagIsDefault(AMD_GPU_FORCE_SINGLE_FP_DENORM)) {
switch (AMD_GPU_FORCE_SINGLE_FP_DENORM) {
case 0:
singleFpDenorm_ = false;
break;
case 1:
singleFpDenorm_ = true;
break;
default:
break;
}
}
}
} // namespace roc