From e596d88dde064bd3f968438c1385fd0ad9070bba Mon Sep 17 00:00:00 2001
From: foreman
Date: Wed, 24 Jan 2018 18:37:08 -0500
Subject: [PATCH] P4 to Git Change 1507590 by gandryey@gera-w8 on 2018/01/24
18:30:51
SWDEV-142271 - Performance drop is observed in Ocean Surface Simulation of Compubenchcl in 17.50 when compared to 17.Q4.1
- Fix compilation errors in Linux.
Affected files ...
... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palwavelimiter.cpp#5 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palwavelimiter.hpp#6 edit
[ROCm/clr commit: 0558a4abb6bb88602d4e3b94212cc8d4471db6e6]
---
projects/clr/rocclr/runtime/device/pal/palwavelimiter.cpp | 6 +++---
projects/clr/rocclr/runtime/device/pal/palwavelimiter.hpp | 2 +-
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/projects/clr/rocclr/runtime/device/pal/palwavelimiter.cpp b/projects/clr/rocclr/runtime/device/pal/palwavelimiter.cpp
index 6fe2b2d06c..8df84fb202 100644
--- a/projects/clr/rocclr/runtime/device/pal/palwavelimiter.cpp
+++ b/projects/clr/rocclr/runtime/device/pal/palwavelimiter.cpp
@@ -13,7 +13,7 @@ namespace pal {
uint WaveLimiter::MaxWave;
uint WaveLimiter::RunCount;
-uint WLAlgorithmSmooth::AdaptCount;
+uint WaveLimiter::AdaptCount;
WaveLimiter::WaveLimiter(WaveLimiterManager* manager, uint seqNum, bool enable, bool enableDump)
: manager_(manager), dumper_(manager_->name() + "_" + std::to_string(seqNum), enableDump) {
@@ -45,9 +45,9 @@ uint WaveLimiter::getWavesPerSH() {
// Generate different wave counts in the adaptation mode
if ((state_ == ADAPT) && (sampleCount_ < AdaptCount)) {
if (numContinuousSamples_ == 0) {
- waves_ = ++waves_ % (MaxWave + 1);
+ waves_ = (++waves_) % (MaxWave + 1);
}
- numContinuousSamples_ = ++numContinuousSamples_ % MaxContinuousSamples;
+ numContinuousSamples_ = (++numContinuousSamples_) % MaxContinuousSamples;
++sampleCount_;
}
else {
diff --git a/projects/clr/rocclr/runtime/device/pal/palwavelimiter.hpp b/projects/clr/rocclr/runtime/device/pal/palwavelimiter.hpp
index 2b67f46109..b069040249 100644
--- a/projects/clr/rocclr/runtime/device/pal/palwavelimiter.hpp
+++ b/projects/clr/rocclr/runtime/device/pal/palwavelimiter.hpp
@@ -63,8 +63,8 @@ class WaveLimiter : public amd::ProfilingCallback {
static uint MaxWave; // Maximum number of waves per SIMD
static uint RunCount; // Number of kernel executions for normal run
- const static uint MaxContinuousSamples = 8;
static uint AdaptCount; // Number of kernel executions for adapting
+ const static uint MaxContinuousSamples = 8;
//! Call back from Event::recordProfilingInfo to get execution time.
virtual void callback(ulong duration, uint32_t waves) = 0;