From 43e8729e46313dcec3e0ce40b6dfbd5187ac9e98 Mon Sep 17 00:00:00 2001
From: foreman
Date: Wed, 4 Feb 2015 12:26:13 -0500
Subject: [PATCH] P4 to Git Change 1118593 by xcui@merged_opencl_jxcwin on
2015/02/04 12:10:27
EPR #413091 - fixed a bug in the gpukenerl processing, the svm memory object of a kernel argument also needs to be updated writer couting for mGPU support, if the memory object is writable for the kernel.
Affected files ...
... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gpukernel.cpp#276 edit
[ROCm/clr commit: c725bca7c12a3e18c428f5b034a70581923eed40]
---
projects/clr/rocclr/runtime/device/gpu/gpukernel.cpp | 3 +++
1 file changed, 3 insertions(+)
diff --git a/projects/clr/rocclr/runtime/device/gpu/gpukernel.cpp b/projects/clr/rocclr/runtime/device/gpu/gpukernel.cpp
index 5c7be0c394..834587c655 100644
--- a/projects/clr/rocclr/runtime/device/gpu/gpukernel.cpp
+++ b/projects/clr/rocclr/runtime/device/gpu/gpukernel.cpp
@@ -3888,6 +3888,9 @@ HSAILKernel::loadArguments(
if (mem != NULL) {
gpuMem = dev().getGpuMemory(mem);
gpuMem->wait(gpu, WaitOnBusyEngine);
+ if ((mem->getMemFlags() & CL_MEM_READ_ONLY) == 0) {
+ mem->signalWrite(&dev());
+ }
memList.push_back(gpuMem);
}
// If finegrainsystem is present then the pointer can be malloced by the app and