From bbe34fec40c1c1fd28a88c259b6a8fe2d7e92d5b Mon Sep 17 00:00:00 2001 From: foreman Date: Mon, 22 Feb 2016 17:03:42 -0500 Subject: [PATCH] P4 to Git Change 1239340 by rili@rili-opencl-stg on 2016/02/22 16:50:49 SWDEV-84552 - Flush HSAIL kernel execution if workload is too big. Affected files ... ... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gpuvirtual.cpp#395 edit [ROCm/clr commit: 01f19b604395b5c54bf5b92b0a9ddd719ca17b1d] --- projects/clr/rocclr/runtime/device/gpu/gpuvirtual.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/projects/clr/rocclr/runtime/device/gpu/gpuvirtual.cpp b/projects/clr/rocclr/runtime/device/gpu/gpuvirtual.cpp index ff284e6f3e..1f867f711c 100644 --- a/projects/clr/rocclr/runtime/device/gpu/gpuvirtual.cpp +++ b/projects/clr/rocclr/runtime/device/gpu/gpuvirtual.cpp @@ -1731,6 +1731,12 @@ VirtualGPU::submitKernelInternalHSA( dbgManager->allocParamMemList(numParams); } + bool needFlush = false; + dmaFlushMgmt_.findSplitSize(dev(), sizes.global().product(), hsaKernel.aqlCodeSize()); + if (dmaFlushMgmt().dispatchSplitSize() != 0) { + needFlush = true; + } + size_t newOffset[3] = {0, 0, 0}; size_t newGlobalSize[3] = {0, 0, 0}; @@ -2008,7 +2014,7 @@ VirtualGPU::submitKernelInternalHSA( } // Update the global GPU event - setGpuEvent(gpuEvent); + setGpuEvent(gpuEvent, needFlush); if (!printfDbgHSA().output(*this, printfEnabled, hsaKernel.printfInfo())) { LogError("Couldn't read printf data from the buffer!\n");