diff --git a/opencl/source/cl_device/cl_device_caps.cpp b/opencl/source/cl_device/cl_device_caps.cpp index 30d281de27..474ff8eed7 100644 --- a/opencl/source/cl_device/cl_device_caps.cpp +++ b/opencl/source/cl_device/cl_device_caps.cpp @@ -64,7 +64,6 @@ void ClDevice::setupFp64Flags() { deviceInfo.doubleFpConfig = defaultFpFlags | CL_FP_SOFT_FLOAT; deviceInfo.nativeVectorWidthDouble = 1; deviceInfo.preferredVectorWidthDouble = 1; - deviceExtensions += "cl_khr_fp64 "; } } else { deviceInfo.doubleFpConfig = 0; @@ -427,13 +426,6 @@ void ClDevice::initializeCaps() { initializeOsSpecificCaps(); getOpenclCFeaturesList(hwInfo, deviceInfo.openclCFeatures, getDevice().getCompilerProductHelper()); - if (hwInfo.capabilityTable.ftrSupportsFP64Emulation && - getDevice().getExecutionEnvironment()->isFP64EmulationEnabled()) { - cl_name_version openClCFeature; - openClCFeature.version = CL_MAKE_VERSION(3, 0, 0); - strcpy_s(openClCFeature.name, CL_NAME_VERSION_MAX_NAME_SIZE, "__opencl_c_fp64"); - deviceInfo.openclCFeatures.push_back(openClCFeature); - } } void ClDevice::initializeExtensionsWithVersion() { diff --git a/opencl/test/unit_test/device/device_caps_tests.cpp b/opencl/test/unit_test/device/device_caps_tests.cpp index 6133607ff0..8a69ba7d23 100644 --- a/opencl/test/unit_test/device/device_caps_tests.cpp +++ b/opencl/test/unit_test/device/device_caps_tests.cpp @@ -123,10 +123,6 @@ struct DeviceGetCapsTest : public ::testing::Test { EXPECT_STREQ("__opencl_c_integer_dot_product_input_4x8bit", (++openclCFeatureIterator)->name); EXPECT_STREQ("__opencl_c_integer_dot_product_input_4x8bit_packed", (++openclCFeatureIterator)->name); } - if (hwInfo.capabilityTable.ftrSupportsFP64Emulation && - clDevice.getDevice().getExecutionEnvironment()->isFP64EmulationEnabled()) { - EXPECT_STREQ("__opencl_c_fp64", (++openclCFeatureIterator)->name); - } EXPECT_EQ(clDevice.getDeviceInfo().openclCFeatures.end(), ++openclCFeatureIterator); } @@ -347,34 +343,6 @@ TEST_F(DeviceGetCapsTest, givenForceOclVersion12WhenCapsAreCreatedThenDeviceRepo verifyOpenclCFeatures(*device); } -TEST_F(DeviceGetCapsTest, givenForceOclVersion30AndFp64EmulationSupportedAndEnabledWhenCapsAreCreatedThenClKhrFp64AndOpenClCFp64ExtensionsAreReported) { - DebugManagerStateRestore dbgRestorer; - DebugManager.flags.ForceOCLVersion.set(30); - HardwareInfo hwInfo = *defaultHwInfo; - hwInfo.capabilityTable.ftrSupportsFP64Emulation = true; - auto executionEnvironment = MockDevice::prepareExecutionEnvironment(&hwInfo, 0u); - executionEnvironment->setFP64EmulationEnabled(); - auto device = std::make_unique(MockDevice::createWithExecutionEnvironment(&hwInfo, executionEnvironment, 0u)); - device->executionEnvironment->setFP64EmulationEnabled(); - const auto &caps = device->getDeviceInfo(); - EXPECT_STREQ("OpenCL 3.0 NEO ", caps.clVersion); - EXPECT_STREQ("OpenCL C 1.2 ", caps.clCVersion); - EXPECT_EQ(CL_MAKE_VERSION(3u, 0u, 0u), caps.numericClVersion); - EXPECT_FALSE(device->ocl21FeaturesEnabled); - verifyOpenclCFeatures(*device); - - bool openclCFp64Found = false; - for (auto &openclCFeature : device->getDeviceInfo().openclCFeatures) { - if (0 == strcmp("__opencl_c_fp64", openclCFeature.name)) { - openclCFp64Found = true; - break; - } - } - - EXPECT_TRUE(openclCFp64Found); - EXPECT_TRUE(hasSubstr(caps.deviceExtensions, std::string("cl_khr_fp64"))); -} - TEST_F(DeviceGetCapsTest, givenForceOCL21FeaturesSupportEnabledWhenCapsAreCreatedThenDeviceReportsSupportOfOcl21Features) { DebugManagerStateRestore dbgRestorer; DebugManager.flags.ForceOCLVersion.set(12); @@ -1186,7 +1154,7 @@ TEST_F(DeviceGetCapsTest, givenFp64EmulationSupportWithFp64EmulationEnvVarSetWhe auto &caps = pClDevice->getDeviceInfo(); std::string extensionString = pClDevice->getDeviceInfo().deviceExtensions; - EXPECT_NE(std::string::npos, extensionString.find(std::string("cl_khr_fp64"))); + EXPECT_EQ(std::string::npos, extensionString.find(std::string("cl_khr_fp64"))); EXPECT_TRUE(isValueSet(caps.doubleFpConfig, CL_FP_SOFT_FLOAT)); cl_device_fp_config defaultFpFlags = static_cast(CL_FP_ROUND_TO_NEAREST | diff --git a/shared/source/compiler_interface/oclc_extensions.h b/shared/source/compiler_interface/oclc_extensions.h index 935c84bf4e..24818ccbfa 100644 --- a/shared/source/compiler_interface/oclc_extensions.h +++ b/shared/source/compiler_interface/oclc_extensions.h @@ -13,7 +13,7 @@ #include -using OpenClCFeaturesContainer = StackVec; +using OpenClCFeaturesContainer = StackVec; namespace NEO { struct HardwareInfo;