diff --git a/opencl/source/cl_device/cl_device.cpp b/opencl/source/cl_device/cl_device.cpp index 6453f1bacf..ada3bf963b 100644 --- a/opencl/source/cl_device/cl_device.cpp +++ b/opencl/source/cl_device/cl_device.cpp @@ -91,12 +91,6 @@ unique_ptr_if_unused ClDevice::decRefInternal() { return pParentDevice->decRefInternal(); } -bool ClDevice::isOcl21Conformant() const { - auto &hwInfo = device.getHardwareInfo(); - return (hwInfo.capabilityTable.supportsOcl21Features && hwInfo.capabilityTable.supportsDeviceEnqueue && - hwInfo.capabilityTable.supportsPipes && hwInfo.capabilityTable.supportsIndependentForwardProgress); -} - void ClDevice::retainApi() { auto parentDeviceId = deviceInfo.parentDevice; if (parentDeviceId) { diff --git a/opencl/source/cl_device/cl_device.h b/opencl/source/cl_device/cl_device.h index b2698531c9..de2d946c07 100644 --- a/opencl/source/cl_device/cl_device.h +++ b/opencl/source/cl_device/cl_device.h @@ -58,7 +58,6 @@ class ClDevice : public BaseObject<_cl_device_id> { unsigned int getEnabledClVersion() const { return enabledClVersion; }; bool areOcl21FeaturesEnabled() const { return ocl21FeaturesEnabled; }; - bool isOcl21Conformant() const; void retainApi(); unique_ptr_if_unused releaseApi(); diff --git a/opencl/source/cl_device/cl_device_caps.cpp b/opencl/source/cl_device/cl_device_caps.cpp index 2175b82c07..1d91e0fddc 100644 --- a/opencl/source/cl_device/cl_device_caps.cpp +++ b/opencl/source/cl_device/cl_device_caps.cpp @@ -103,7 +103,7 @@ void ClDevice::initializeCaps() { switch (enabledClVersion) { case 30: deviceInfo.clVersion = "OpenCL 3.0 NEO "; - deviceInfo.clCVersion = (isOcl21Conformant() ? "OpenCL C 3.0 " : "OpenCL C 1.2 "); + deviceInfo.clCVersion = "OpenCL C 1.2 "; deviceInfo.numericClVersion = CL_MAKE_VERSION(3, 0, 0); break; case 21: @@ -434,11 +434,6 @@ void ClDevice::initializeOpenclCAllVersions() { openClCVersion.version = CL_MAKE_VERSION(1, 2, 0); deviceInfo.openclCAllVersions.push_back(openClCVersion); - if (isOcl21Conformant()) { - openClCVersion.version = CL_MAKE_VERSION(2, 0, 0); - deviceInfo.openclCAllVersions.push_back(openClCVersion); - } - if (enabledClVersion == 30) { openClCVersion.version = CL_MAKE_VERSION(3, 0, 0); deviceInfo.openclCAllVersions.push_back(openClCVersion); diff --git a/opencl/test/unit_test/device/device_caps_tests.cpp b/opencl/test/unit_test/device/device_caps_tests.cpp index 1bc187eae1..4161a0c947 100644 --- a/opencl/test/unit_test/device/device_caps_tests.cpp +++ b/opencl/test/unit_test/device/device_caps_tests.cpp @@ -58,9 +58,6 @@ struct DeviceGetCapsTest : public ::testing::Test { EXPECT_EQ(CL_MAKE_VERSION(1u, 1u, 0u), (++openclCWithVersionIterator)->version); EXPECT_EQ(CL_MAKE_VERSION(1u, 2u, 0u), (++openclCWithVersionIterator)->version); - if (clDevice.isOcl21Conformant()) { - EXPECT_EQ(CL_MAKE_VERSION(2u, 0u, 0u), (++openclCWithVersionIterator)->version); - } if (clDevice.getEnabledClVersion() == 30) { EXPECT_EQ(CL_MAKE_VERSION(3u, 0u, 0u), (++openclCWithVersionIterator)->version); } @@ -130,8 +127,7 @@ TEST_F(DeviceGetCapsTest, WhenCreatingDeviceThenCapsArePopulatedCorrectly) { EXPECT_NE(nullptr, caps.driverVersion); EXPECT_NE(nullptr, caps.profile); EXPECT_STREQ("OpenCL 3.0 NEO ", caps.clVersion); - auto expectedClCVersion = (device->isOcl21Conformant() ? "OpenCL C 3.0 " : "OpenCL C 1.2 "); - EXPECT_STREQ(expectedClCVersion, caps.clCVersion); + EXPECT_STREQ("OpenCL C 1.2 ", caps.clCVersion); EXPECT_NE(0u, caps.numericClVersion); EXPECT_GT(caps.openclCAllVersions.size(), 0u); EXPECT_GT(caps.openclCFeatures.size(), 0u); @@ -257,10 +253,6 @@ TEST_F(DeviceGetCapsTest, WhenCreatingDeviceThenCapsArePopulatedCorrectly) { if (device->getHardwareInfo().capabilityTable.supportsOcl21Features == false && is64bit) { EXPECT_TRUE(sharedCaps.force32BitAddressess); } - - if (caps.numericClVersion == 21) { - EXPECT_TRUE(device->isOcl21Conformant()); - } } HWTEST_F(DeviceGetCapsTest, givenDeviceWhenAskingForSubGroupSizesThenReturnCorrectValues) { @@ -296,9 +288,8 @@ TEST_F(DeviceGetCapsTest, givenForceOclVersion30WhenCapsAreCreatedThenDeviceRepo DebugManager.flags.ForceOCLVersion.set(30); auto device = std::make_unique(MockDevice::createWithNewExecutionEnvironment(defaultHwInfo.get())); const auto &caps = device->getDeviceInfo(); - auto expectedClCVersion = (device->isOcl21Conformant() ? "OpenCL C 3.0 " : "OpenCL C 1.2 "); EXPECT_STREQ("OpenCL 3.0 NEO ", caps.clVersion); - EXPECT_STREQ(expectedClCVersion, caps.clCVersion); + EXPECT_STREQ("OpenCL C 1.2 ", caps.clCVersion); EXPECT_EQ(CL_MAKE_VERSION(3u, 0u, 0u), caps.numericClVersion); EXPECT_FALSE(device->ocl21FeaturesEnabled); verifyOpenclCAllVersions(*device); diff --git a/opencl/test/unit_test/fixtures/hello_world_kernel_fixture.h b/opencl/test/unit_test/fixtures/hello_world_kernel_fixture.h index fc6f4867e1..4923641518 100644 --- a/opencl/test/unit_test/fixtures/hello_world_kernel_fixture.h +++ b/opencl/test/unit_test/fixtures/hello_world_kernel_fixture.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2018-2021 Intel Corporation + * Copyright (C) 2018-2022 Intel Corporation * * SPDX-License-Identifier: MIT * @@ -50,9 +50,6 @@ struct HelloWorldKernelFixture : public ProgramFixture { if (options) { std::string optionsToProgram(options); - if (optionsToProgram.find("-cl-std=CL2.0") != std::string::npos) { - ASSERT_TRUE(pDevice->isOcl21Conformant()); - } CreateProgramFromBinary( pContext, diff --git a/opencl/test/unit_test/program/program_tests.cpp b/opencl/test/unit_test/program/program_tests.cpp index 2d52cc659b..b8eed57a2a 100644 --- a/opencl/test/unit_test/program/program_tests.cpp +++ b/opencl/test/unit_test/program/program_tests.cpp @@ -2172,7 +2172,6 @@ struct CreateProgramFromBinaryMock : public MockProgram { }; TEST_F(ProgramTests, GivenFailedBinaryWhenCreatingFromIlThenInvalidBinaryErrorIsReturned) { - REQUIRE_OCL_21_OR_SKIP(pContext); const uint32_t notSpirv[16] = {0xDEADBEEF}; cl_int retVal = CL_SUCCESS; auto prog = Program::createFromIL>(pContext, reinterpret_cast(notSpirv), sizeof(notSpirv), retVal); @@ -2181,7 +2180,6 @@ TEST_F(ProgramTests, GivenFailedBinaryWhenCreatingFromIlThenInvalidBinaryErrorIs } TEST_F(ProgramTests, GivenSuccessfullyBuiltBinaryWhenCreatingFromIlThenValidProgramIsReturned) { - REQUIRE_OCL_21_OR_SKIP(pContext); const uint32_t spirv[16] = {0x03022307}; cl_int retVal = CL_SUCCESS; auto prog = Program::createFromIL>(pContext, reinterpret_cast(spirv), sizeof(spirv), retVal); @@ -2191,7 +2189,6 @@ TEST_F(ProgramTests, GivenSuccessfullyBuiltBinaryWhenCreatingFromIlThenValidProg } TEST_F(ProgramTests, givenProgramCreatedFromILWhenCompileIsCalledThenReuseTheILInsteadOfCallingCompilerInterface) { - REQUIRE_OCL_21_OR_SKIP(pContext); const uint32_t spirv[16] = {0x03022307}; cl_int errCode = 0; auto pProgram = Program::createFromIL(pContext, reinterpret_cast(spirv), sizeof(spirv), errCode); @@ -2222,7 +2219,6 @@ TEST_F(ProgramTests, givenProgramCreatedFromIntermediateBinaryRepresentationWhen } TEST_F(ProgramTests, GivenIlIsNullptrWhenCreatingFromIlThenInvalidBinaryErrorIsReturned) { - REQUIRE_OCL_21_OR_SKIP(pContext); cl_int retVal = CL_SUCCESS; auto prog = Program::createFromIL>(pContext, nullptr, 16, retVal); EXPECT_EQ(nullptr, prog); @@ -2230,7 +2226,6 @@ TEST_F(ProgramTests, GivenIlIsNullptrWhenCreatingFromIlThenInvalidBinaryErrorIsR } TEST_F(ProgramTests, GivenIlSizeZeroWhenCreatingFromIlThenInvalidBinaryErrorIsReturned) { - REQUIRE_OCL_21_OR_SKIP(pContext); const uint32_t spirv[16] = {0x03022307}; cl_int retVal = CL_SUCCESS; auto prog = Program::createFromIL>(pContext, reinterpret_cast(spirv), 0, retVal); @@ -2239,7 +2234,6 @@ TEST_F(ProgramTests, GivenIlSizeZeroWhenCreatingFromIlThenInvalidBinaryErrorIsRe } TEST_F(ProgramTests, WhenCreatingFromIlThenIsSpirvIsSetCorrectly) { - REQUIRE_OCL_21_OR_SKIP(pContext); const uint32_t spirv[16] = {0x03022307}; cl_int retVal = CL_SUCCESS; auto prog = Program::createFromIL(pContext, reinterpret_cast(spirv), sizeof(spirv), retVal); @@ -2297,7 +2291,6 @@ TEST(isValidSpirvBinary, whenBinaryDoesNotContainLllvMagicThenBinaryIsNotValidLL } TEST_F(ProgramTests, WhenLinkingTwoValidSpirvProgramsThenValidProgramIsReturned) { - REQUIRE_OCL_21_OR_SKIP(pContext); const uint32_t spirv[16] = {0x03022307}; cl_int errCode = CL_SUCCESS; diff --git a/opencl/test/unit_test/test_macros/test_checks_ocl.cpp b/opencl/test/unit_test/test_macros/test_checks_ocl.cpp index 60b915e01b..5706d350b6 100644 --- a/opencl/test/unit_test/test_macros/test_checks_ocl.cpp +++ b/opencl/test/unit_test/test_macros/test_checks_ocl.cpp @@ -26,13 +26,9 @@ bool TestChecks::supportsImages(const Context *pContext) { return pContext->getDevice(0)->getSharedDeviceInfo().imageSupport; } -bool TestChecks::supportsOcl21(const Context *pContext) { - return pContext->getDevice(0)->isOcl21Conformant(); -} - bool TestChecks::supportsOcl21(const std::unique_ptr &pHardwareInfo) { - return (pHardwareInfo->capabilityTable.supportsOcl21Features && pHardwareInfo->capabilityTable.supportsDeviceEnqueue && - pHardwareInfo->capabilityTable.supportsPipes && pHardwareInfo->capabilityTable.supportsIndependentForwardProgress); + return (pHardwareInfo->capabilityTable.supportsOcl21Features && pHardwareInfo->capabilityTable.supportsPipes && + pHardwareInfo->capabilityTable.supportsIndependentForwardProgress); } bool TestChecks::supportsAuxResolves() { diff --git a/opencl/test/unit_test/test_macros/test_checks_ocl.h b/opencl/test/unit_test/test_macros/test_checks_ocl.h index efbcc1b5b8..dfd627b4be 100644 --- a/opencl/test/unit_test/test_macros/test_checks_ocl.h +++ b/opencl/test/unit_test/test_macros/test_checks_ocl.h @@ -17,7 +17,6 @@ struct HardwareInfo; namespace TestChecks { bool supportsSvm(const ClDevice *pClDevice); bool supportsImages(const Context *pContext); -bool supportsOcl21(const Context *pContext); bool supportsOcl21(const std::unique_ptr &pHardwareInfo); bool supportsPipes(const ClDevice *pClDevice); bool supportsAuxResolves();