From aea58b76addf964fd9595bb06fdb59f36f894287 Mon Sep 17 00:00:00 2001 From: foreman Date: Wed, 1 Aug 2018 12:30:25 -0400 Subject: [PATCH] P4 to Git Change 1588199 by gandryey@gera-w8 on 2018/08/01 11:53:29 SWDEV-155434 - Add SQTT instrumentation tokens for OpenCL dispatches for RGP support - Fix the build. Affected files ... ... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palvirtual.cpp#119 edit [ROCm/clr commit: 9fb27ccc8bec8f7cfc13de9c20f58cb7ec7a7f3a] --- projects/clr/rocclr/runtime/device/pal/palvirtual.cpp | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/projects/clr/rocclr/runtime/device/pal/palvirtual.cpp b/projects/clr/rocclr/runtime/device/pal/palvirtual.cpp index f89e67a4ad..1c55b5049f 100644 --- a/projects/clr/rocclr/runtime/device/pal/palvirtual.cpp +++ b/projects/clr/rocclr/runtime/device/pal/palvirtual.cpp @@ -2138,11 +2138,15 @@ bool VirtualGPU::submitKernelInternal(const amd::NDRangeContainer& sizes, const // If RGP capturing is enabled, then start SQTT trace if (rgpCaptureEna()) { + size_t newLocalSize[3] = { 1, 1, 1 }; + for (uint i = 0; i < sizes.dimensions(); i++) { + newLocalSize[i] = sizes.local()[i]; + } dev().rgpCaptureMgr()->PreDispatch(this, hsaKernel, // Report global size in workgroups, since that's the RGP trace semantics - newGlobalSize[0] / sizes.local[0], - newGlobalSize[1] / sizes.local[1], - newGlobalSize[2] / sizes.local[2]); + newGlobalSize[0] / newLocalSize[0], + newGlobalSize[1] / newLocalSize[1], + newGlobalSize[2] / newLocalSize[2]); } bool printfEnabled = (hsaKernel.printfInfo().size() > 0) ? true : false;