From cf278cec27836a6aabcd8e290f8e32110fc18dd8 Mon Sep 17 00:00:00 2001
From: foreman
Date: Tue, 26 Feb 2019 11:22:30 -0500
Subject: [PATCH] P4 to Git Change 1748655 by wchau@wchau_OCL_boltzmann on
2019/02/26 10:50:47
SWDEV-180407 - Observed failure while running OCL 2.0 conformance API : min_max_device_version
- revert CL1739455 to use OCL version 1.2 as default to avoid this issue for ROCm 2.2 release
Affected files ...
... //depot/stg/opencl/drivers/opencl/runtime/device/rocm/rocdevice.cpp#117 edit
---
rocclr/runtime/device/rocm/rocdevice.cpp | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/rocclr/runtime/device/rocm/rocdevice.cpp b/rocclr/runtime/device/rocm/rocdevice.cpp
index fbc3a1fdc7..16ca308911 100644
--- a/rocclr/runtime/device/rocm/rocdevice.cpp
+++ b/rocclr/runtime/device/rocm/rocdevice.cpp
@@ -1076,9 +1076,11 @@ bool Device::populateOCLDeviceConstants() {
strcpy(info_.driverVersion_, ss.str().c_str());
- // Enable OpenCL 2.0 for Vega10+
- if (deviceInfo_.gfxipVersion_ >= 900) {
- info_.version_ = "OpenCL " /*OPENCL_VERSION_STR*/"2.0" " ";
+ // Allow testing OpenCL 2.1 features with the OPENCL_VERSION variable. We don't accept OPENCL_VERSION
+ // values other than 210, since the default value of OPENCL_VERSION is 200. Accepting 200 would report
+ // 'OpenCL 2.0' by default.
+ if (OPENCL_VERSION == 210) {
+ info_.version_ = "OpenCL " /*OPENCL_VERSION_STR*/"2.1" " ";
} else {
info_.version_ = "OpenCL " /*OPENCL_VERSION_STR*/"1.2" " ";
}