diff --git a/runtime/gen11/hw_helper_gen11.cpp b/runtime/gen11/hw_helper_gen11.cpp index 55d98ba53e..d77a4bcebd 100644 --- a/runtime/gen11/hw_helper_gen11.cpp +++ b/runtime/gen11/hw_helper_gen11.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2018-2019 Intel Corporation + * Copyright (C) 2018-2020 Intel Corporation * * SPDX-License-Identifier: MIT * @@ -17,6 +17,11 @@ uint32_t HwHelperHw::getComputeUnitsUsedForScratch(const HardwareInfo *p return pHwInfo->gtSystemInfo.MaxSubSlicesSupported * pHwInfo->gtSystemInfo.MaxEuPerSubSlice * 8; } +template <> +std::string HwHelperHw::getExtensions() const { + return "cl_intel_subgroup_local_block_io "; +} + template class AubHelperHw; template class HwHelperHw; template class FlatBatchBufferHelperHw; diff --git a/runtime/gen12lp/hw_helper_gen12lp.cpp b/runtime/gen12lp/hw_helper_gen12lp.cpp index b310b57067..969e1317df 100644 --- a/runtime/gen12lp/hw_helper_gen12lp.cpp +++ b/runtime/gen12lp/hw_helper_gen12lp.cpp @@ -117,6 +117,11 @@ void PipeControlHelper::addPipeControlWA(LinearStream &commandStream, ui } } +template <> +std::string HwHelperHw::getExtensions() const { + return "cl_intel_subgroup_local_block_io "; +} + template class AubHelperHw; template class HwHelperHw; template class FlatBatchBufferHelperHw; diff --git a/runtime/platform/extensions.cpp b/runtime/platform/extensions.cpp index adc7df5935..6d1c751b3b 100644 --- a/runtime/platform/extensions.cpp +++ b/runtime/platform/extensions.cpp @@ -29,7 +29,9 @@ const char *deviceExtensionsList = "cl_khr_3d_image_writes " "cl_intel_driver_diagnostics " "cl_khr_priority_hints " "cl_khr_throttle_hints " - "cl_khr_create_command_queue "; + "cl_khr_create_command_queue " + "cl_intel_subgroups_char " + "cl_intel_subgroups_long "; std::string getExtensionsList(const HardwareInfo &hwInfo) { std::string allExtensionsList; diff --git a/unit_tests/api/cl_get_device_info_tests.inl b/unit_tests/api/cl_get_device_info_tests.inl index b1c6f2a454..7ab29170d6 100644 --- a/unit_tests/api/cl_get_device_info_tests.inl +++ b/unit_tests/api/cl_get_device_info_tests.inl @@ -180,7 +180,8 @@ TEST_F(clGetDeviceInfoTests, GivenClDeviceExtensionsParamWhenGettingDeviceInfoTh "cl_khr_priority_hints ", "cl_khr_throttle_hints ", "cl_khr_create_command_queue ", - }; + "cl_intel_subgroups_char ", + "cl_intel_subgroups_long "}; for (auto element = 0u; element < sizeof(supportedExtensions) / sizeof(supportedExtensions[0]); element++) { auto foundOffset = extensionString.find(supportedExtensions[element]); diff --git a/unit_tests/device/device_caps_tests.cpp b/unit_tests/device/device_caps_tests.cpp index d37b11c4e8..33bd4576be 100644 --- a/unit_tests/device/device_caps_tests.cpp +++ b/unit_tests/device/device_caps_tests.cpp @@ -699,6 +699,20 @@ TEST_F(DeviceGetCapsTest, deviceReportsThrottleHintsExtension) { EXPECT_THAT(caps.deviceExtensions, testing::HasSubstr(std::string("cl_khr_throttle_hints"))); } +TEST_F(DeviceGetCapsTest, GivenAnyDeviceWhenCheckingExtensionsThenSupportSubgroupsChar) { + auto device = std::unique_ptr(MockDevice::createWithNewExecutionEnvironment(platformDevices[0])); + const auto &caps = device->getDeviceInfo(); + + EXPECT_THAT(caps.deviceExtensions, testing::HasSubstr(std::string("cl_intel_subgroups_char"))); +} + +TEST_F(DeviceGetCapsTest, GivenAnyDeviceWhenCheckingExtensionsThenSupportSubgroupsLong) { + auto device = std::unique_ptr(MockDevice::createWithNewExecutionEnvironment(platformDevices[0])); + const auto &caps = device->getDeviceInfo(); + + EXPECT_THAT(caps.deviceExtensions, testing::HasSubstr(std::string("cl_intel_subgroups_long"))); +} + TEST_F(DeviceGetCapsTest, givenAtleastOCL2DeviceThenExposesMipMapAndUnifiedMemoryExtensions) { DebugManagerStateRestore dbgRestorer; DebugManager.flags.ForceOCLVersion.set(20); diff --git a/unit_tests/gen11/test_device_caps_gen11.cpp b/unit_tests/gen11/test_device_caps_gen11.cpp index 200d6faab1..367d458143 100644 --- a/unit_tests/gen11/test_device_caps_gen11.cpp +++ b/unit_tests/gen11/test_device_caps_gen11.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2018-2019 Intel Corporation + * Copyright (C) 2018-2020 Intel Corporation * * SPDX-License-Identifier: MIT * @@ -63,3 +63,9 @@ GEN11TEST_F(Gen11DeviceCaps, givenGen11WhenCheckBlitterOperationsSupportThenRetu GEN11TEST_F(Gen11DeviceCaps, givenGen11WhenCheckingImageSupportThenReturnTrue) { EXPECT_TRUE(pDevice->getHardwareInfo().capabilityTable.supportsImages); } + +GEN11TEST_F(Gen11DeviceCaps, givenGen11WhenCheckExtensionsThenSubgroupLocalBlockIOIsSupported) { + const auto &caps = pDevice->getDeviceInfo(); + + EXPECT_THAT(caps.deviceExtensions, testing::HasSubstr(std::string("cl_intel_subgroup_local_block_io"))); +} \ No newline at end of file diff --git a/unit_tests/gen12lp/test_device_caps_gen12lp.inl b/unit_tests/gen12lp/test_device_caps_gen12lp.inl index e069f156a9..bf7b40cdfa 100644 --- a/unit_tests/gen12lp/test_device_caps_gen12lp.inl +++ b/unit_tests/gen12lp/test_device_caps_gen12lp.inl @@ -1,5 +1,5 @@ /* - * Copyright (C) 2019 Intel Corporation + * Copyright (C) 2020 Intel Corporation * * SPDX-License-Identifier: MIT * @@ -27,6 +27,12 @@ TGLLPTEST_F(Gen12LpDeviceCaps, lpSkusDontSupportFP64) { EXPECT_EQ(0u, caps.doubleFpConfig); } +TGLLPTEST_F(Gen12LpDeviceCaps, givenGen12lpWhenCheckExtensionsThenSubgroupLocalBlockIOIsSupported) { + const auto &caps = pDevice->getDeviceInfo(); + + EXPECT_THAT(caps.deviceExtensions, testing::HasSubstr(std::string("cl_intel_subgroup_local_block_io"))); +} + TGLLPTEST_F(Gen12LpDeviceCaps, allSkusSupportCorrectlyRoundedDivideSqrt) { const auto &caps = pDevice->getDeviceInfo(); EXPECT_EQ(0u, caps.singleFpConfig & CL_FP_CORRECTLY_ROUNDED_DIVIDE_SQRT);