From f02e1e3ed8b5dda2e64ea869854b3cdccaafde74 Mon Sep 17 00:00:00 2001 From: foreman Date: Fri, 7 Nov 2014 16:37:32 -0500 Subject: [PATCH] P4 to Git Change 1095076 by rili@rili_opencl_stg on 2014/11/07 16:25:17 EPR #408185 - Use pinned memory if directaccess is true and remoteAlloc is used. Affected files ... ... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gpudevice.cpp#478 edit [ROCm/clr commit: c24b46e708c7c746ea8133b87c889fb5dda84220] --- projects/clr/rocclr/runtime/device/gpu/gpudevice.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/projects/clr/rocclr/runtime/device/gpu/gpudevice.cpp b/projects/clr/rocclr/runtime/device/gpu/gpudevice.cpp index 038345a085..cf9b951e01 100644 --- a/projects/clr/rocclr/runtime/device/gpu/gpudevice.cpp +++ b/projects/clr/rocclr/runtime/device/gpu/gpudevice.cpp @@ -1565,7 +1565,8 @@ Device::createBuffer( } else if (directAccess || (type == Resource::Remote)) { // Check for system memory allocations - if (owner.getMemFlags() & (CL_MEM_ALLOC_HOST_PTR | CL_MEM_USE_HOST_PTR)) { + if ((owner.getMemFlags() & (CL_MEM_ALLOC_HOST_PTR | CL_MEM_USE_HOST_PTR)) + || (settings().remoteAlloc_)) { // Allocate remote memory if AHP allocation and context has just 1 device if ((owner.getMemFlags() & CL_MEM_ALLOC_HOST_PTR) && (owner.getContext().devices().size() == 1)) {