From 093a4dd733eeb487260df15b9706777ff14d2ab9 Mon Sep 17 00:00:00 2001 From: foreman Date: Thu, 4 Jun 2015 13:30:57 -0400 Subject: [PATCH] P4 to Git Change 1157927 by asalmanp@asalmanp-opencl-stg1 on 2015/06/04 13:19:47 EPR #420344 - Forum [180211]: enqueueNDRangeKernel crashes to execute device binary if it contains printf statements This is a temporary workaround to avoid app crash when a kernel has pritntf but the program object is built from a binary (i.e., the printf info is not propagated if the program object is built from a binary). ReviewBoardURL = http://ocltc.amd.com/reviews/r/7676/ Affected files ... ... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gpuprintf.cpp#36 edit [ROCm/clr commit: a53e6a74a46bd992e803eadd5607a64331e2ed67] --- projects/clr/rocclr/runtime/device/gpu/gpuprintf.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/projects/clr/rocclr/runtime/device/gpu/gpuprintf.cpp b/projects/clr/rocclr/runtime/device/gpu/gpuprintf.cpp index 7981c7b452..bcfb17fa32 100644 --- a/projects/clr/rocclr/runtime/device/gpu/gpuprintf.cpp +++ b/projects/clr/rocclr/runtime/device/gpu/gpuprintf.cpp @@ -93,7 +93,7 @@ PrintfDbg::output( const std::vector& printfInfo) { // Are we expected to generate debug output? - if (printfEnabled) { + if (printfEnabled && !printfInfo.empty()) { uint32_t* workitemData; size_t i, j, k, z; bool realloc = false;