From e416c5bbf0830f5492892accc0deb5c1609bbb36 Mon Sep 17 00:00:00 2001 From: foreman Date: Wed, 6 Aug 2014 11:38:31 -0400 Subject: [PATCH] P4 to Git Change 1063414 by gandryey@gera-dev-w7 on 2014/08/06 11:30:27 ECR #304775 - Add OPENCL_VERSION key to force OCL1.2 Affected files ... ... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gpudevice.cpp#453 edit ... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gpusettings.cpp#274 edit ... //depot/stg/opencl/drivers/opencl/runtime/utils/flags.hpp#209 edit --- rocclr/runtime/device/gpu/gpudevice.cpp | 3 ++- rocclr/runtime/device/gpu/gpusettings.cpp | 2 +- rocclr/runtime/utils/flags.hpp | 2 ++ 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/rocclr/runtime/device/gpu/gpudevice.cpp b/rocclr/runtime/device/gpu/gpudevice.cpp index 7bd01093fc..f8e5c32a66 100644 --- a/rocclr/runtime/device/gpu/gpudevice.cpp +++ b/rocclr/runtime/device/gpu/gpudevice.cpp @@ -744,7 +744,8 @@ Device::create(CALuint ordinal) appProfile_.init(); // Open GSL device - if (!open(ordinal, appProfile_.enableHighPerformanceState(), appProfile_.reportAsOCL12Device())) { + if (!open(ordinal, appProfile_.enableHighPerformanceState(), + (appProfile_.reportAsOCL12Device() || (OPENCL_VERSION < 200)))) { return false; } diff --git a/rocclr/runtime/device/gpu/gpusettings.cpp b/rocclr/runtime/device/gpu/gpusettings.cpp index 363ba49192..f227c0f5bc 100644 --- a/rocclr/runtime/device/gpu/gpusettings.cpp +++ b/rocclr/runtime/device/gpu/gpusettings.cpp @@ -291,7 +291,7 @@ Settings::create( force32BitOcl20_ = true; oclVersion_ = reportAsOCL12Device ? OpenCL12 : XCONCAT(OpenCL,XCONCAT(OPENCL_MAJOR,OPENCL_MINOR)); } - if (hsail_) { + if (hsail_ || (OPENCL_VERSION < 200)) { oclVersion_ = OpenCL12; } numComputeRings_ = 8; diff --git a/rocclr/runtime/utils/flags.hpp b/rocclr/runtime/utils/flags.hpp index 862c7d199b..d0df030198 100644 --- a/rocclr/runtime/utils/flags.hpp +++ b/rocclr/runtime/utils/flags.hpp @@ -156,6 +156,8 @@ release(bool, AMD_DEPTH_MSAA_INTEROP, false, \ "Enable depth stencil and MSAA buffer interop") \ release(bool, AMD_THREAD_TRACE_ENABLE, false, \ "Enable thread trace extension") \ +release(uint, OPENCL_VERSION, 200, \ + "Force opencl verison") \ release(bool, ENVVAR_HSA_POLL_KERNEL_COMPLETION, false, \ "Determines if Hsa runtime should use polling scheme") \ release(bool, HSA_LOCAL_MEMORY_ENABLE, false, \