From 90f72101233e1f5e52e1927b7280da5cd04398ad Mon Sep 17 00:00:00 2001
From: foreman
Date: Wed, 9 Oct 2019 12:18:24 -0400
Subject: [PATCH] P4 to Git Change 2010785 by gandryey@gera-win10 on 2019/10/09
12:00:14
SWDEV-205994 - [CQE OCL][NAVI10][DTB-BLOCKER] ~ 10% -50% performance drop observed while running IndigoBench Benchmark | Faulty CL#2007647
- PAL changed the value reported in numAvailableVgprs on Navi10. Runtime has to switch to vgprsPerSimd for scratch buffer size calculation.
Affected files ...
... //depot/stg/opencl/drivers/opencl/runtime/device/pal/paldevice.cpp#172 edit
[ROCm/clr commit: a65bdb6d6dba1d0c28d0d778e89a3707dcb57764]
---
projects/clr/rocclr/runtime/device/pal/paldevice.cpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/projects/clr/rocclr/runtime/device/pal/paldevice.cpp b/projects/clr/rocclr/runtime/device/pal/paldevice.cpp
index 91c138996f..c0fc3b2f3f 100644
--- a/projects/clr/rocclr/runtime/device/pal/paldevice.cpp
+++ b/projects/clr/rocclr/runtime/device/pal/paldevice.cpp
@@ -2032,7 +2032,7 @@ bool Device::allocScratch(uint regNum, const VirtualGPU* vgpu, uint vgprs) {
// Calculate the size of the scratch buffer for a queue
uint32_t numTotalCUs = properties().gfxipProperties.shaderCore.numAvailableCus;
// Find max waves based on VGPR per SIMD
- uint32_t numMaxWaves = properties().gfxipProperties.shaderCore.numAvailableVgprs / vgprs;
+ uint32_t numMaxWaves = properties().gfxipProperties.shaderCore.vgprsPerSimd / vgprs;
// Find max waves per CU
numMaxWaves *= properties().gfxipProperties.shaderCore.numSimdsPerCu;
// Find max waves per device