From 0bfb898038dba6e8c8bec2b0b30758bc6ad4be6f Mon Sep 17 00:00:00 2001 From: German Andryeyev Date: Mon, 7 Feb 2022 17:34:39 -0500 Subject: [PATCH] SWDEV-286150 - Don't report OCL2.2 support OCL2.2 requires SPIR-V and runtime doesn't support it. Make sure PAL backend doesn't report any SPIR-V support. Change-Id: I8d179069674205b54f7d20d149bcb675bee5cdb0 [ROCm/clr commit: 0bf395af39aa17e15003c5a950f6608731f083a6] --- projects/clr/rocclr/cmake/FindAMD_OPENCL.cmake | 2 +- projects/clr/rocclr/device/pal/paldevice.cpp | 4 +--- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/projects/clr/rocclr/cmake/FindAMD_OPENCL.cmake b/projects/clr/rocclr/cmake/FindAMD_OPENCL.cmake index bae08a70cd..c60e8c8180 100644 --- a/projects/clr/rocclr/cmake/FindAMD_OPENCL.cmake +++ b/projects/clr/rocclr/cmake/FindAMD_OPENCL.cmake @@ -54,7 +54,7 @@ mark_as_advanced(AMD_OPENCL_INCLUDE_DIR) set(AMD_OPENCL_DEFS -DHAVE_CL2_HPP -DOPENCL_MAJOR=2 - -DOPENCL_MINOR=2 + -DOPENCL_MINOR=1 -DOPENCL_C_MAJOR=2 -DOPENCL_C_MINOR=0 -DCL_TARGET_OPENCL_VERSION=220 diff --git a/projects/clr/rocclr/device/pal/paldevice.cpp b/projects/clr/rocclr/device/pal/paldevice.cpp index 1385b79dba..ecc1edd1c2 100644 --- a/projects/clr/rocclr/device/pal/paldevice.cpp +++ b/projects/clr/rocclr/device/pal/paldevice.cpp @@ -499,18 +499,16 @@ void NullDevice::fillDeviceInfo(const Pal::DeviceProperties& palProp, settings().useLightning_ ? ",LC" : ",HSAIL", isOnline() ? "" : " [Offline]"); info_.profile_ = "FULL_PROFILE"; + info_.spirVersions_ = ""; if (settings().oclVersion_ >= OpenCL20) { info_.version_ = "OpenCL 2.0 " AMD_PLATFORM_INFO; info_.oclcVersion_ = "OpenCL C 2.0 "; - info_.spirVersions_ = "1.2"; } else if (settings().oclVersion_ == OpenCL12) { info_.version_ = "OpenCL 1.2 " AMD_PLATFORM_INFO; info_.oclcVersion_ = "OpenCL C 1.2 "; - info_.spirVersions_ = "1.2"; } else { info_.version_ = "OpenCL 1.0 " AMD_PLATFORM_INFO; info_.oclcVersion_ = "OpenCL C 1.0 "; - info_.spirVersions_ = ""; LogError("Unknown version for support"); }