From e75f6223e2ef7e9f8ae3b4c8a1c7ae8512deb28e Mon Sep 17 00:00:00 2001
From: foreman
Date: Wed, 12 Aug 2015 21:03:02 -0400
Subject: [PATCH] P4 to Git Change 1179851 by bdhanase@opencl_intel5 on
2015/08/12 20:49:50
EPR #397491 - Disable 32 bit OCL2.0 on Win 10 for now. isWindows10OrLater() call doesn't work. So, passing a flag from GSL to runtime to disable 32 bit OCL2.0 on Win 10.
http://ocltc.amd.com/reviews/r/8234/
Affected files ...
... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gpusettings.cpp#321 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gslbe/src/rt/GSLDevice.cpp#133 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gslbe/src/rt/backend.h#8 edit
[ROCm/clr commit: 68cf197c2222392e256f2538ec43349a5d4759db]
---
projects/clr/rocclr/runtime/device/gpu/gpusettings.cpp | 2 +-
.../clr/rocclr/runtime/device/gpu/gslbe/src/rt/GSLDevice.cpp | 1 +
projects/clr/rocclr/runtime/device/gpu/gslbe/src/rt/backend.h | 1 +
3 files changed, 3 insertions(+), 1 deletion(-)
diff --git a/projects/clr/rocclr/runtime/device/gpu/gpusettings.cpp b/projects/clr/rocclr/runtime/device/gpu/gpusettings.cpp
index f23f494f56..7afec91a8b 100644
--- a/projects/clr/rocclr/runtime/device/gpu/gpusettings.cpp
+++ b/projects/clr/rocclr/runtime/device/gpu/gpusettings.cpp
@@ -294,7 +294,7 @@ Settings::create(
if (ciPlus_) {
libSelector_ = amd::GPU_Library_CI;
- if (LP64_SWITCH(WINDOWS_SWITCH((viPlus_ && !IsWindows10OrGreater()), false), true)) {
+ if (LP64_SWITCH(WINDOWS_SWITCH((viPlus_ && !calAttr.isWDDM2Enabled), false), true)) {
oclVersion_ = !reportAsOCL12Device && calAttr.isOpenCL200Device ?
XCONCAT(OpenCL, XCONCAT(OPENCL_MAJOR, OPENCL_MINOR)) : OpenCL12;
}
diff --git a/projects/clr/rocclr/runtime/device/gpu/gslbe/src/rt/GSLDevice.cpp b/projects/clr/rocclr/runtime/device/gpu/gslbe/src/rt/GSLDevice.cpp
index 5fe46a8832..8b4178a6ab 100644
--- a/projects/clr/rocclr/runtime/device/gpu/gslbe/src/rt/GSLDevice.cpp
+++ b/projects/clr/rocclr/runtime/device/gpu/gslbe/src/rt/GSLDevice.cpp
@@ -149,6 +149,7 @@ CALGSLDevice::getAttribs_int(gsl::gsCtx* cs)
m_attribs.numOfVpu = m_adp->pAsicInfo->numberOfVPU;
m_attribs.isOpenCL200Device = m_adp->pAsicInfo->bIsOpen2Device;
m_attribs.isSVMFineGrainSystem = m_adp->pAsicInfo->svmFineGrainSystem;
+ m_attribs.isWDDM2Enabled = m_adp->pAsicInfo->vaAvailable && m_adp->pAsicInfo->bNoVATranslation;
}
bool
diff --git a/projects/clr/rocclr/runtime/device/gpu/gslbe/src/rt/backend.h b/projects/clr/rocclr/runtime/device/gpu/gslbe/src/rt/backend.h
index 6613092cde..762c380d6b 100644
--- a/projects/clr/rocclr/runtime/device/gpu/gslbe/src/rt/backend.h
+++ b/projects/clr/rocclr/runtime/device/gpu/gslbe/src/rt/backend.h
@@ -103,6 +103,7 @@ typedef struct CALdeviceattribsRec {
CALuint numOfVpu; /**< number of vpu in the device*/
bool isOpenCL200Device; /**< the flag to mark if the device is OpenCL 200 */
bool isSVMFineGrainSystem; /**< check if SVM finegrainsystem */
+ bool isWDDM2Enabled; /**< check if WDDM2 is enabled */
} CALdeviceattribs;