From d20537e59569aba435f3f8df5cd64776826fd6e8 Mon Sep 17 00:00:00 2001 From: wkwchau Date: Wed, 17 Jul 2019 23:19:29 -0400 Subject: [PATCH] Fixed bug of determine max block size in hipOccupancyMaxPotentialBlockSize (#1235) [ROCm/clr commit: 6ec476e50a5b67b616cdc09174a883653fc1e12a] --- projects/clr/hipamd/src/hip_module.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/projects/clr/hipamd/src/hip_module.cpp b/projects/clr/hipamd/src/hip_module.cpp index 9680299540..594555e2b8 100644 --- a/projects/clr/hipamd/src/hip_module.cpp +++ b/projects/clr/hipamd/src/hip_module.cpp @@ -993,7 +993,7 @@ hipError_t ihipOccupancyMaxPotentialBlockSize(uint32_t* gridSize, uint32_t* bloc tmp_min = min(maxWavesSGPRSLimited, tmp_min); activeWavefronts = min(maxWavesVGPRSLimited, tmp_min); - if (maxActivWaves < activeWavefronts) { + if (maxActivWaves <= activeWavefronts) { maxActivWaves = activeWavefronts; maxWavefronts = wavefrontsPerWG; }