diff --git a/opencl/source/cl_device/cl_device_caps.cpp b/opencl/source/cl_device/cl_device_caps.cpp index 84bc99c7f0..684887f9aa 100644 --- a/opencl/source/cl_device/cl_device_caps.cpp +++ b/opencl/source/cl_device/cl_device_caps.cpp @@ -27,6 +27,7 @@ static std::string vendor = "Intel(R) Corporation"; static std::string profile = "FULL_PROFILE"; static std::string spirVersions = "1.2 "; static std::string spirvName = "SPIR-V"; +const char *latestConformanceVersionPassed = "1.0"; #define QTR(a) #a #define TOSTR(b) QTR(b) static std::string driverVersion = TOSTR(NEO_OCL_DRIVER_VERSION); @@ -117,6 +118,7 @@ void ClDevice::initializeCaps() { deviceInfo.numericClVersion = CL_MAKE_VERSION(1, 2, 0); break; } + deviceInfo.latestConformanceVersionPassed = latestConformanceVersionPassed; initializeOpenclCAllVersions(); deviceInfo.platformLP = (hwInfo.capabilityTable.supportsOcl21Features == false); deviceInfo.spirVersions = spirVersions.c_str(); diff --git a/opencl/source/cl_device/cl_device_info.cpp b/opencl/source/cl_device/cl_device_info.cpp index cdac1efcb9..7981139c0f 100644 --- a/opencl/source/cl_device/cl_device_info.cpp +++ b/opencl/source/cl_device/cl_device_info.cpp @@ -98,6 +98,7 @@ cl_int ClDevice::getDeviceInfo(cl_device_info paramName, case CL_DEVICE_HOST_UNIFIED_MEMORY: getCap(src, srcSize, retSize); break; case CL_DEVICE_IL_VERSION: getStr(src, srcSize, retSize); break; case CL_DEVICE_IMAGE_SUPPORT: getCap(src, srcSize, retSize); break; + case CL_DEVICE_LATEST_CONFORMANCE_VERSION_PASSED: getStr(src, srcSize, retSize); break; case CL_DEVICE_LINKER_AVAILABLE: getCap(src, srcSize, retSize); break; case CL_DEVICE_LOCAL_MEM_SIZE: getCap(src, srcSize, retSize); break; case CL_DEVICE_LOCAL_MEM_TYPE: getCap(src, srcSize, retSize); break; diff --git a/opencl/source/cl_device/cl_device_info.h b/opencl/source/cl_device/cl_device_info.h index cb49262760..4178d0eec3 100644 --- a/opencl/source/cl_device/cl_device_info.h +++ b/opencl/source/cl_device/cl_device_info.h @@ -49,6 +49,7 @@ struct ClDeviceInfo { const char *clCVersion; const char *spirVersions; const char *deviceExtensions; + const char *latestConformanceVersionPassed; cl_device_id parentDevice; cl_device_affinity_domain partitionAffinityDomain; cl_uint partitionMaxSubDevices; diff --git a/opencl/source/cl_device/cl_device_info_map.h b/opencl/source/cl_device/cl_device_info_map.h index ae112da967..3b640f98df 100644 --- a/opencl/source/cl_device/cl_device_info_map.h +++ b/opencl/source/cl_device/cl_device_info_map.h @@ -106,6 +106,7 @@ template<> struct Map : template<> struct Map : public ClMapBase {}; template<> struct Map : public ClMapBase {}; template<> struct Map : public ClMapBase {}; +template<> struct Map : public ClMapBase {}; template<> struct Map : public ClMapBase {}; template<> struct Map : public ClMapBase {}; template<> struct Map : public ClMapBase {}; diff --git a/opencl/test/unit_test/api/cl_get_device_info_tests.inl b/opencl/test/unit_test/api/cl_get_device_info_tests.inl index 6c896cdb94..aa0d5d07c7 100644 --- a/opencl/test/unit_test/api/cl_get_device_info_tests.inl +++ b/opencl/test/unit_test/api/cl_get_device_info_tests.inl @@ -313,6 +313,7 @@ TEST_P(GetDeviceInfoStr, GivenStringTypeParamWhenGettingDeviceInfoThenSuccessIsR static cl_device_info deviceInfoStrParams[] = { CL_DEVICE_BUILT_IN_KERNELS, + CL_DEVICE_LATEST_CONFORMANCE_VERSION_PASSED, CL_DEVICE_NAME, CL_DEVICE_OPENCL_C_VERSION, CL_DEVICE_PROFILE, diff --git a/opencl/test/unit_test/api/gl/cl_get_gl_device_info_tests.cpp b/opencl/test/unit_test/api/gl/cl_get_gl_device_info_tests.cpp index d017718540..d30feb19b4 100644 --- a/opencl/test/unit_test/api/gl/cl_get_gl_device_info_tests.cpp +++ b/opencl/test/unit_test/api/gl/cl_get_gl_device_info_tests.cpp @@ -84,8 +84,8 @@ TEST_P(GetDeviceGlInfoStr, StringType) { // Define new command types to run the parameterized tests static cl_device_info deviceInfoStrParams[] = { - CL_DEVICE_BUILT_IN_KERNELS, CL_DEVICE_EXTENSIONS, CL_DEVICE_NAME, CL_DEVICE_OPENCL_C_VERSION, - CL_DEVICE_PROFILE, CL_DEVICE_VENDOR, CL_DEVICE_VERSION, CL_DRIVER_VERSION}; + CL_DEVICE_BUILT_IN_KERNELS, CL_DEVICE_EXTENSIONS, CL_DEVICE_LATEST_CONFORMANCE_VERSION_PASSED, CL_DEVICE_NAME, + CL_DEVICE_OPENCL_C_VERSION, CL_DEVICE_PROFILE, CL_DEVICE_VENDOR, CL_DEVICE_VERSION, CL_DRIVER_VERSION}; INSTANTIATE_TEST_CASE_P(api, GetDeviceGlInfoStr, testing::ValuesIn(deviceInfoStrParams)); diff --git a/opencl/test/unit_test/device/device_caps_tests.cpp b/opencl/test/unit_test/device/device_caps_tests.cpp index f8da081a54..af7b79c787 100644 --- a/opencl/test/unit_test/device/device_caps_tests.cpp +++ b/opencl/test/unit_test/device/device_caps_tests.cpp @@ -126,6 +126,7 @@ TEST_F(DeviceGetCapsTest, WhenCreatingDeviceThenCapsArePopulatedCorrectly) { EXPECT_GT(caps.openclCAllVersions.size(), 0u); EXPECT_GT(caps.openclCFeatures.size(), 0u); EXPECT_EQ(caps.extensionsWithVersion.size(), 0u); + EXPECT_STREQ("1.0", caps.latestConformanceVersionPassed); EXPECT_NE(nullptr, caps.spirVersions); EXPECT_NE(nullptr, caps.deviceExtensions); diff --git a/opencl/test/unit_test/device/get_device_info_size_tests.cpp b/opencl/test/unit_test/device/get_device_info_size_tests.cpp index 9e21463452..5161bc255a 100644 --- a/opencl/test/unit_test/device/get_device_info_size_tests.cpp +++ b/opencl/test/unit_test/device/get_device_info_size_tests.cpp @@ -6,6 +6,7 @@ */ #include "shared/source/helpers/get_info.h" +#include "shared/source/helpers/string.h" #include "opencl/source/cl_device/cl_device_info_map.h" #include "opencl/test/unit_test/fixtures/cl_device_fixture.h" @@ -16,6 +17,10 @@ #include +namespace NEO { +extern const char *latestConformanceVersionPassed; +} // namespace NEO + using namespace NEO; struct GetDeviceInfoSize : public ::testing::TestWithParam> { @@ -60,6 +65,7 @@ std::pair deviceInfoParams2[] = { {CL_DEVICE_GLOBAL_VARIABLE_PREFERRED_TOTAL_SIZE, sizeof(size_t)}, // {CL_DEVICE_IL_VERSION, sizeof(char[])}, {CL_DEVICE_IMAGE_SUPPORT, sizeof(cl_bool)}, + {CL_DEVICE_LATEST_CONFORMANCE_VERSION_PASSED, strlen(latestConformanceVersionPassed) + 1}, {CL_DEVICE_LINKER_AVAILABLE, sizeof(cl_bool)}, {CL_DEVICE_LOCAL_MEM_SIZE, sizeof(cl_ulong)}, {CL_DEVICE_LOCAL_MEM_TYPE, sizeof(cl_device_local_mem_type)}, diff --git a/opencl/test/unit_test/device/get_device_info_tests.cpp b/opencl/test/unit_test/device/get_device_info_tests.cpp index f279347075..1ce457ad41 100644 --- a/opencl/test/unit_test/device/get_device_info_tests.cpp +++ b/opencl/test/unit_test/device/get_device_info_tests.cpp @@ -742,6 +742,7 @@ cl_device_info deviceInfoParams[] = { CL_DEVICE_HALF_FP_CONFIG, CL_DEVICE_HOST_UNIFIED_MEMORY, CL_DEVICE_IMAGE_SUPPORT, + CL_DEVICE_LATEST_CONFORMANCE_VERSION_PASSED, CL_DEVICE_LINKER_AVAILABLE, CL_DEVICE_LOCAL_MEM_SIZE, CL_DEVICE_LOCAL_MEM_TYPE,