P4 to Git Change 1174182 by jatang@jatang-opencl-hsa-stg1 on 2015/07/27 10:26:56

ECR #333753 - denorms-are-zero runtime change.

Affected files ...

... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gpudevice.cpp#514 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gpuprogram.cpp#196 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gpusettings.cpp#315 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gpusettings.hpp#92 edit
... //depot/stg/opencl/drivers/opencl/runtime/utils/flags.hpp#236 edit
This commit is contained in:
foreman
2015-07-27 10:49:26 -04:00
parent c57ef1bb5b
commit b96feac3b6
5 changed files with 24 additions and 3 deletions
+1 -1
View File
@@ -267,7 +267,7 @@ void NullDevice::fillDeviceInfo(
info_.singleFPConfig_ = CL_FP_ROUND_TO_NEAREST | CL_FP_ROUND_TO_ZERO
| CL_FP_ROUND_TO_INF | CL_FP_INF_NAN | CL_FP_FMA;
if (GPU_FORCE_SINGLE_FP_DENORM) {
if (settings().singleFpDenorm_) {
info_.singleFPConfig_ |= CL_FP_DENORM;
}
+3
View File
@@ -2172,6 +2172,9 @@ HSAILProgram::hsailOptions()
if (dev().settings().reportFMA_) {
hsailOptions.append(" -DFP_FAST_FMA=1");
}
if (!dev().settings().singleFpDenorm_) {
hsailOptions.append(" -cl-denorms-are-zero");
}
// Check if the host is 64 bit or 32 bit
LP64_ONLY(hsailOptions.append(" -m64"));
+17
View File
@@ -146,6 +146,9 @@ Settings::Settings()
// Use host queue for device enqueuing by default
useDeviceQueue_ = GPU_USE_DEVICE_QUEUE;
// Don't support Denormals for single precision by default
singleFpDenorm_ = false;
}
bool
@@ -251,6 +254,7 @@ Settings::create(
case CAL_TARGET_BAFFIN:
// Disable tiling aperture on VI+
linearPersistentImage_ = true;
singleFpDenorm_ = true;
viPlus_ = true;
// Fall through to CI ...
case CAL_TARGET_KALINDI:
@@ -547,6 +551,19 @@ Settings::override()
if (!flagIsDefault(GPU_RESOURCE_CACHE_SIZE)) {
resourceCacheSize_ = GPU_RESOURCE_CACHE_SIZE * Mi;
}
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 gpu
@@ -74,6 +74,7 @@ public:
uint asyncMemCopy_: 1; //!< Use async memory transfers
uint hsailDirectSRD_: 1; //!< Controls direct SRD for HSAIL
uint useDeviceQueue_: 1; //!< Submit to separate device queue
uint singleFpDenorm_: 1; //!< Support Single FP Denorm
};
uint value_;
};
+2 -2
View File
@@ -170,8 +170,8 @@ release(bool, GPU_IFH_MODE, false, \
"1 = Enable GPU IFH (infinitely fast hardware) mode. Any other value keeps setting disabled.") \
release(bool, GPU_MIPMAP, !IS_MAINLINE, \
"Enables GPU mipmap extension") \
debug(bool, GPU_FORCE_SINGLE_FP_DENORM, false, \
"Forces reporting CL_FP_DENORM bit for single precision") \
release(int, AMD_GPU_FORCE_SINGLE_FP_DENORM, -1, \
"Force denorm for single precision: -1 - don't force, 0 - disable, 1 - enable") \
debug(bool, OCL_FORCE_CPU_SVM, false, \
"force svm support for CPU") \
debug(bool, GPU_ENABLE_HW_DEBUG, false, \