From 2ca1592a87ddeae4fb02914926b5e08793d51a7d Mon Sep 17 00:00:00 2001
From: foreman
Date: Thu, 14 Mar 2019 19:33:16 -0400
Subject: [PATCH] P4 to Git Change 1756725 by jatang@jatang_win_pal_lc on
2019/03/14 18:00:06
SWDEV-178313 - Enable OpenCL 2.0 and the ClKhrImage2dFromBuffer extension on ROCm/LC path for Vega10+.
Affected files ...
... //depot/stg/opencl/drivers/opencl/runtime/device/rocm/rocdevice.cpp#122 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/rocm/rocsettings.cpp#42 edit
[ROCm/clr commit: 2e184e8605a9ccb86b1feb66207ac515493efb92]
---
projects/clr/rocclr/runtime/device/rocm/rocdevice.cpp | 8 +++-----
projects/clr/rocclr/runtime/device/rocm/rocsettings.cpp | 1 +
2 files changed, 4 insertions(+), 5 deletions(-)
diff --git a/projects/clr/rocclr/runtime/device/rocm/rocdevice.cpp b/projects/clr/rocclr/runtime/device/rocm/rocdevice.cpp
index f1f65e1599..cc4f3028e6 100644
--- a/projects/clr/rocclr/runtime/device/rocm/rocdevice.cpp
+++ b/projects/clr/rocclr/runtime/device/rocm/rocdevice.cpp
@@ -1146,11 +1146,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*/"2.0" " ";
} else {
info_.version_ = "OpenCL " /*OPENCL_VERSION_STR*/"1.2" " ";
}
diff --git a/projects/clr/rocclr/runtime/device/rocm/rocsettings.cpp b/projects/clr/rocclr/runtime/device/rocm/rocsettings.cpp
index 90752a164a..e2d7a8c529 100644
--- a/projects/clr/rocclr/runtime/device/rocm/rocsettings.cpp
+++ b/projects/clr/rocclr/runtime/device/rocm/rocsettings.cpp
@@ -95,6 +95,7 @@ bool Settings::create(bool fullProfile, int gfxipVersion) {
enableExtension(ClKhr3DImageWrites);
enableExtension(ClAmdMediaOps);
enableExtension(ClAmdMediaOps2);
+ enableExtension(ClKhrImage2dFromBuffer);
if (MesaInterop::Supported()) {
enableExtension(ClKhrGlSharing);
}