P4 to Git Change 1201249 by jatang@jatang-opencl-hsa-stg2 on 2015/10/19 16:47:00

SWDEV-78799 - Fix a division by 0 error.

	Occasionally the profiling duration of some light weight kernel is 0, and would cause division by 0 error to the WLAlgorithmSmooth algorithm. We can just skip collecting this duration for the adaption algorithm.

Affected files ...

... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gpuwavelimiter.cpp#11 edit
This commit is contained in:
foreman
2015-10-19 17:41:21 -04:00
parent 8b5af23596
commit b06ee3a1a9
+1 -1
View File
@@ -135,7 +135,7 @@ void WLAlgorithmSmooth::outputTrace() {
void WLAlgorithmSmooth::callback(ulong duration) {
dumper_.addData(duration, currWaves_, static_cast<char>(state_));
if (!enable_) {
if (!enable_ || (duration == 0)) {
return;
}