From b1bc4f4cad49b6a937ad77c1920dbd09f019eaf7 Mon Sep 17 00:00:00 2001 From: Compute-Runtime-Validation Date: Mon, 8 Jul 2024 05:46:41 +0200 Subject: [PATCH] Revert "fix: Add missing fp64 extensions in caps initialization" This reverts commit 9a486dd5a1ebebb3e07248bbb2b6761ec0f96c26. Signed-off-by: Compute-Runtime-Validation --- opencl/source/cl_device/cl_device_caps.cpp | 8 ---- .../unit_test/device/device_caps_tests.cpp | 39 +------------------ 2 files changed, 1 insertion(+), 46 deletions(-) diff --git a/opencl/source/cl_device/cl_device_caps.cpp b/opencl/source/cl_device/cl_device_caps.cpp index d9f1818f29..84eea894fb 100644 --- a/opencl/source/cl_device/cl_device_caps.cpp +++ b/opencl/source/cl_device/cl_device_caps.cpp @@ -65,7 +65,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; @@ -431,13 +430,6 @@ void ClDevice::initializeCaps() { initializeOsSpecificCaps(); getOpenclCFeaturesList(hwInfo, deviceInfo.openclCFeatures, getDevice().getCompilerProductHelper(), releaseHelper); - 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 c24d5d168b..66beaf8c86 100644 --- a/opencl/test/unit_test/device/device_caps_tests.cpp +++ b/opencl/test/unit_test/device/device_caps_tests.cpp @@ -126,11 +126,6 @@ struct DeviceGetCapsTest : public ::testing::Test { EXPECT_STREQ("__opencl_c_integer_dot_product_input_4x8bit_packed", (++openclCFeatureIterator)->name); } verifyAnyRemainingOpenclCFeatures(releaseHelper, openclCFeatureIterator); - if (hwInfo.capabilityTable.ftrSupportsFP64Emulation && - clDevice.getDevice().getExecutionEnvironment()->isFP64EmulationEnabled()) { - EXPECT_STREQ("__opencl_c_fp64", (++openclCFeatureIterator)->name); - } - EXPECT_EQ(clDevice.getDeviceInfo().openclCFeatures.end(), ++openclCFeatureIterator); } @@ -350,38 +345,6 @@ TEST_F(DeviceGetCapsTest, givenForceOclVersion12WhenCapsAreCreatedThenDeviceRepo verifyOpenclCFeatures(*device); } -TEST_F(DeviceGetCapsTest, givenForceOclVersion30AndFp64EmulationSupportedAndEnabledWhenCapsAreCreatedThenClKhrFp64AndOpenClCFp64ExtensionsAreReported) { - DebugManagerStateRestore dbgRestorer; - debugManager.flags.ForceOCLVersion.set(30); - - HardwareInfo hwInfo = *defaultHwInfo; - hwInfo.capabilityTable.ftrSupportsFP64 = false; - hwInfo.capabilityTable.ftrSupportsFP64Emulation = true; - - auto executionEnvironment = MockDevice::prepareExecutionEnvironment(&hwInfo, 0u); - executionEnvironment->setFP64EmulationEnabled(); - - auto device = std::make_unique(MockDevice::createWithExecutionEnvironment(&hwInfo, executionEnvironment, 0u)); - 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); @@ -1204,7 +1167,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 |