From ff1165efe8006bb0c21262ec0384ac478dd8dcc4 Mon Sep 17 00:00:00 2001
From: foreman
Date: Mon, 4 Feb 2019 09:53:26 -0500
Subject: [PATCH] P4 to Git Change 1739455 by jatang@jatang_win_pal_lc on
2019/02/04 09:39:34
SWDEV-178313 - Enable OpenCL 2.0 on ROCm/LC path for Vega10+
Doorbell self-ring doesn't work for Fiji, so we enable 2.0 only for Vega10+ for now.
Affected files ...
... //depot/stg/opencl/drivers/opencl/runtime/device/rocm/rocdevice.cpp#114 edit
---
rocclr/runtime/device/rocm/rocdevice.cpp | 8 +++-----
1 file changed, 3 insertions(+), 5 deletions(-)
diff --git a/rocclr/runtime/device/rocm/rocdevice.cpp b/rocclr/runtime/device/rocm/rocdevice.cpp
index f9cf4de5a0..10735e02f1 100644
--- a/rocclr/runtime/device/rocm/rocdevice.cpp
+++ b/rocclr/runtime/device/rocm/rocdevice.cpp
@@ -1076,11 +1076,9 @@ bool Device::populateOCLDeviceConstants() {
strcpy(info_.driverVersion_, ss.str().c_str());
- // 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" " ";
+ // Enable OpenCL 2.0 for Vega10+
+ if (deviceInfo_.gfxipVersion_ >= 900) {
+ info_.version_ = "OpenCL " OPENCL_VERSION_STR " ";
} else {
info_.version_ = "OpenCL " /*OPENCL_VERSION_STR*/"1.2" " ";
}