From a904ee09f9ff61d6484385c8be3bf06389abe721 Mon Sep 17 00:00:00 2001 From: foreman Date: Mon, 6 Oct 2014 17:58:11 -0400 Subject: [PATCH] P4 to Git Change 1084677 by xcui@merged_opencl_jxcwin on 2014/10/06 17:48:09 EPR #406328 - made more changes so that the OpenCL can run 2.0 devices on the first 2.0 capable device and OpenCL 1.2 on the rest of devices if they can suppport. Also uncommented an assert accidently commted by the previous check in. this is the OpenCL part of checkin. Prechecking: http://ocltc.amd.com:8111/viewModification.html?modId=40944&personal=true&buildTypeId=&tab=vcsModificationBuilds&show_all_builds=true code review: http://ocltc.amd.com/reviews/r/5987/ Affected files ... ... //depot/stg/opencl/drivers/opencl/api/opencl/amdocl/cl_svm.cpp#6 edit ... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gpusettings.cpp#288 edit ... //depot/stg/opencl/drivers/opencl/runtime/platform/context.cpp#31 edit [ROCm/clr commit: 43907276212fd20daf8fac2f54d0df42242438dc] --- projects/clr/rocclr/runtime/device/gpu/gpusettings.cpp | 2 +- projects/clr/rocclr/runtime/platform/context.cpp | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/projects/clr/rocclr/runtime/device/gpu/gpusettings.cpp b/projects/clr/rocclr/runtime/device/gpu/gpusettings.cpp index 10fbac7c4c..1be76a0de6 100644 --- a/projects/clr/rocclr/runtime/device/gpu/gpusettings.cpp +++ b/projects/clr/rocclr/runtime/device/gpu/gpusettings.cpp @@ -321,6 +321,7 @@ Settings::create( if (oclVersion_ >= OpenCL20) { supportDepthsRGB_ = true; + customSvmAllocator_ = true; } if (use64BitPtr_) { if (GPU_ENABLE_LARGE_ALLOCATION) { @@ -387,7 +388,6 @@ Settings::create( imageSupport_ = true; singleHeap_ = true; - customSvmAllocator_ = true; // Use kernels for blit if appropriate blitEngine_ = BlitEngineKernel; diff --git a/projects/clr/rocclr/runtime/platform/context.cpp b/projects/clr/rocclr/runtime/platform/context.cpp index 61ea45fa19..b57f880c85 100644 --- a/projects/clr/rocclr/runtime/platform/context.cpp +++ b/projects/clr/rocclr/runtime/platform/context.cpp @@ -39,7 +39,9 @@ Context::Context( "is allowed per context"); customHostAllocDevice_ = device; } - if (device->customSvmAllocator()) { + if (device->customSvmAllocator() + && (customSvmAllocDevice_ == NULL)) + { customSvmAllocDevice_ = device; } }