From f41340272e3ca5ffadec1646def1da46aaa94042 Mon Sep 17 00:00:00 2001
From: foreman
Date: Wed, 21 Oct 2015 18:35:09 -0400
Subject: [PATCH] P4 to Git Change 1202371 by mbareghe@mbareghe_stg_win30 on
2015/10/21 18:22:36
SWDEV-79399 - OpenCL printf does not print correctly when the printf builtin function is called twice - clear the local printf info each time
Affected files ...
... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gpukernel.cpp#305 edit
[ROCm/clr commit: 6800b9f00366afc9258e5b0d12224a91cba439ee]
---
projects/clr/rocclr/runtime/device/gpu/gpukernel.cpp | 1 +
1 file changed, 1 insertion(+)
diff --git a/projects/clr/rocclr/runtime/device/gpu/gpukernel.cpp b/projects/clr/rocclr/runtime/device/gpu/gpukernel.cpp
index 288ae3bc61..a749740e71 100644
--- a/projects/clr/rocclr/runtime/device/gpu/gpukernel.cpp
+++ b/projects/clr/rocclr/runtime/device/gpu/gpukernel.cpp
@@ -3302,6 +3302,7 @@ HSAILKernel::initPrintf(const aclPrintfFmt* aclPrintf)
printf_.resize(index + 1);
}
std::string pfmt = aclPrintf->fmtStr;
+ info.fmtString_.clear();
size_t pos = 0;
for (size_t i = 0; i < pfmt.size(); ++i) {
char symbol = pfmt[pos++];