From de5e6ef1631ef8a34365baae52dc3dbbbec1c0ce Mon Sep 17 00:00:00 2001 From: foreman Date: Fri, 28 Nov 2014 17:45:30 -0500 Subject: [PATCH] P4 to Git Change 1101351 by skudchad@skudchad_test_win_opencl2 on 2014/11/28 17:32:17 EPR #403782 - IOMMU2/SVM - For finegrainsystem, the app can pass a malloced pointer directly to the kernel. Copy pointer directly to the aqlArgBuf without exiting. ReviewBoardURL = http://ocltc.amd.com/reviews/r/6378/diff/ Affected files ... ... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gpukernel.cpp#269 edit [ROCm/clr commit: 2ba0f2a11246489eafa343974bac8ec443ff4f8b] --- projects/clr/rocclr/runtime/device/gpu/gpukernel.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/projects/clr/rocclr/runtime/device/gpu/gpukernel.cpp b/projects/clr/rocclr/runtime/device/gpu/gpukernel.cpp index 58e4358b15..25389cbdf5 100644 --- a/projects/clr/rocclr/runtime/device/gpu/gpukernel.cpp +++ b/projects/clr/rocclr/runtime/device/gpu/gpukernel.cpp @@ -3868,7 +3868,9 @@ HSAILKernel::loadArguments( gpuMem->wait(gpu, WaitOnBusyEngine); memList.push_back(gpuMem); } - else { + // If finegrainsystem is present then the pointer can be malloced by the app and + // passed to kernel directly. If so copy the pointer location to aqlArgBuf + else if ((dev().info().svmCapabilities_ & CL_DEVICE_SVM_FINE_GRAIN_SYSTEM) == 0) { return NULL; } break;