From 3a2b8cdfb5ac8da9ada69b7e3259ea81674067aa Mon Sep 17 00:00:00 2001 From: foreman Date: Mon, 11 May 2015 15:14:59 -0400 Subject: [PATCH] P4 to Git Change 1149454 by yaxunl@yaxunl_stg_win50 on 2015/05/11 15:00:43 EPR #419065 - [CQE OCL][ISV][QR][G] FAHBenchmark application is crashing. Two issues: 1. Remove clearing of profileEnabled_ since it may cause incorrect kernel execution time measurement. 2. Blit kernels causes assertion in getWavesPerSH since they do not have wave limiters. Remove the assert. If a kernel has no wave limiter, returns 0 in getWavesPerSH. Affected files ... ... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gpuvirtual.cpp#361 edit ... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gpuwavelimiter.cpp#5 edit [ROCm/clr commit: 7a956a4aa785204f07b6caf235b6a2041b38e1f4] --- projects/clr/rocclr/runtime/device/gpu/gpuvirtual.cpp | 1 - projects/clr/rocclr/runtime/device/gpu/gpuwavelimiter.cpp | 4 +++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/projects/clr/rocclr/runtime/device/gpu/gpuvirtual.cpp b/projects/clr/rocclr/runtime/device/gpu/gpuvirtual.cpp index 902c6fa885..43c6e42e8d 100644 --- a/projects/clr/rocclr/runtime/device/gpu/gpuvirtual.cpp +++ b/projects/clr/rocclr/runtime/device/gpu/gpuvirtual.cpp @@ -2806,7 +2806,6 @@ VirtualGPU::awaitCompletion(CommandBatch* cb, const amd::Event* waitingEvent) // Make sure that profiling is enabled if (profileEnabled_) { - profileEnabled_ = false; return profilingCollectResults(cb, waitingEvent); } // Mark the first command in the batch as running diff --git a/projects/clr/rocclr/runtime/device/gpu/gpuwavelimiter.cpp b/projects/clr/rocclr/runtime/device/gpu/gpuwavelimiter.cpp index 58b624a59b..52cecb7321 100644 --- a/projects/clr/rocclr/runtime/device/gpu/gpuwavelimiter.cpp +++ b/projects/clr/rocclr/runtime/device/gpu/gpuwavelimiter.cpp @@ -228,7 +228,9 @@ uint WaveLimiterManager::getWavesPerSH(const device::VirtualDevice *vdev) const return 0; } auto loc = limiters_.find(vdev); - assert (loc != limiters_.end()); + if (loc == limiters_.end()) { + return 0; + } assert(loc->second != NULL); return loc->second->getWavesPerSH(); }