From 51e0a6fb8c13787c319d52e7dc1b57fff9db4de5 Mon Sep 17 00:00:00 2001
From: "Agarwal, Udit" <udit.agarwal@intel.com>
Date: Mon, 5 Feb 2024 15:29:13 -0800
Subject: [PATCH 1/5] Drop acc from ONEAPI_DEVICE_SELECTOR

---
 sycl/source/detail/config.cpp        | 33 ++++++++++++++++++++++++++++
 sycl/source/detail/config.hpp        | 10 +++++++++
 sycl/source/detail/device_filter.cpp | 16 +++++++++++++-
 3 files changed, 58 insertions(+), 1 deletion(-)

diff --git a/sycl/source/detail/config.cpp b/sycl/source/detail/config.cpp
index f7760aa227168..2a879240380da 100644
--- a/sycl/source/detail/config.cpp
+++ b/sycl/source/detail/config.cpp
@@ -161,6 +161,38 @@ void dumpConfig() {
 #undef CONFIG
 }
 
+#ifdef __INTEL_PREVIEW_BREAKING_CHANGES
+// Array is used by ONEAPI_DEVICE_SELECTOR.
+// TODO: host device type will be removed once sycl_ext_oneapi_filter_selector
+// is removed.
+// TODO: At some point, we should also align the inputs of SYCL_DEVICE_ALLOWLIST
+// and ONEAPI_DEVICE_SELECTOR. Currently, SYCL_DEVICE_ALLOWLIST accepts 'acc' while
+// ONEAPI_DEVICE_SELECTOR accepts 'fpga'.
+const std::array<std::pair<std::string, info::device_type>, 5> &
+getODSDeviceTypeMap() {
+  static const std::array<std::pair<std::string, info::device_type>, 5>
+      SyclDeviceTypeMap = {{{"host", info::device_type::host},
+                            {"cpu", info::device_type::cpu},
+                            {"gpu", info::device_type::gpu},
+                            {"fpga", info::device_type::accelerator},
+                            {"*", info::device_type::all}}};
+  return SyclDeviceTypeMap;
+}
+
+// Array is used by SYCL_DEVICE_ALLOWLIST.
+// TODO: host device type will be removed once sycl_ext_oneapi_filter_selector
+// is removed.
+const std::array<std::pair<std::string, info::device_type>, 5> &
+getSyclDeviceTypeMap() {
+  static const std::array<std::pair<std::string, info::device_type>, 5>
+      SyclDeviceTypeMap = {{{"host", info::device_type::host},
+                            {"cpu", info::device_type::cpu},
+                            {"gpu", info::device_type::gpu},
+                            {"acc", info::device_type::accelerator},
+                            {"*", info::device_type::all}}};
+  return SyclDeviceTypeMap;
+}
+#else
 // Array is used by SYCL_DEVICE_ALLOWLIST and ONEAPI_DEVICE_SELECTOR.
 // TODO: host device type will be removed once sycl_ext_oneapi_filter_selector
 // is removed.
@@ -175,6 +207,7 @@ getSyclDeviceTypeMap() {
                             {"*", info::device_type::all}}};
   return SyclDeviceTypeMap;
 }
+#endif
 
 // Array is used by SYCL_DEVICE_FILTER and SYCL_DEVICE_ALLOWLIST and
 // ONEAPI_DEVICE_SELECTOR
diff --git a/sycl/source/detail/config.hpp b/sycl/source/detail/config.hpp
index 8f048e0f95f60..4e45a4a7af72b 100644
--- a/sycl/source/detail/config.hpp
+++ b/sycl/source/detail/config.hpp
@@ -231,9 +231,19 @@ template <> class SYCLConfig<SYCL_PARALLEL_FOR_RANGE_ROUNDING_PARAMS> {
   }
 };
 
+#ifdef __INTEL_PREVIEW_BREAKING_CHANGES
+// Array is used by ONEAPI_DEVICE_SELECTOR.
+const std::array<std::pair<std::string, info::device_type>, 5> &
+getODSDeviceTypeMap();
+
+// Array is used by SYCL_DEVICE_ALLOWLIST.
+const std::array<std::pair<std::string, info::device_type>, 5> &
+getSyclDeviceTypeMap();
+#else
 // Array is used by SYCL_DEVICE_ALLOWLIST and ONEAPI_DEVICE_SELECTOR.
 const std::array<std::pair<std::string, info::device_type>, 6> &
 getSyclDeviceTypeMap();
+#endif
 
 // Array is used by SYCL_DEVICE_FILTER and SYCL_DEVICE_ALLOWLIST and
 // ONEAPI_DEVICE_SELECTOR
diff --git a/sycl/source/detail/device_filter.cpp b/sycl/source/detail/device_filter.cpp
index 311ebeaa174b8..b23b588ef3355 100644
--- a/sycl/source/detail/device_filter.cpp
+++ b/sycl/source/detail/device_filter.cpp
@@ -92,10 +92,18 @@ static void Parse_ODS_Device(ods_target &Target,
 
   std::string_view TopDeviceStr = DeviceSubTuple[0];
 
+  #ifdef __INTEL_PREVIEW_BREAKING_CHANGES
+  // Handle explicit device type (e.g. 'gpu').
+  auto DeviceTypeMap =
+      getODSDeviceTypeMap(); // <-- std::array<std::pair<std::string,
+                              // info::device::type>>
+  #else
   // Handle explicit device type (e.g. 'gpu').
   auto DeviceTypeMap =
       getSyclDeviceTypeMap(); // <-- std::array<std::pair<std::string,
                               // info::device::type>>
+  #endif
+
   auto It =
       std::find_if(std::begin(DeviceTypeMap), std::end(DeviceTypeMap),
                    [&](auto DtPair) { return TopDeviceStr == DtPair.first; });
@@ -262,7 +270,13 @@ Parse_ONEAPI_DEVICE_SELECTOR(const std::string &envString) {
 std::ostream &operator<<(std::ostream &Out, const ods_target &Target) {
   Out << Target.Backend;
   if (Target.DeviceType) {
-    auto DeviceTypeMap = getSyclDeviceTypeMap();
+#ifdef __INTEL_PREVIEW_BREAKING_CHANGES
+  auto DeviceTypeMap =
+      getODSDeviceTypeMap();
+#else
+  auto DeviceTypeMap =
+      getSyclDeviceTypeMap();
+#endif
     auto Match = std::find_if(
         DeviceTypeMap.begin(), DeviceTypeMap.end(),
         [&](auto Pair) { return (Pair.second == Target.DeviceType); });

From c86af808d3e3f3f3647a27909867f778bc95c0e7 Mon Sep 17 00:00:00 2001
From: "Agarwal, Udit" <udit.agarwal@intel.com>
Date: Mon, 5 Feb 2024 15:31:10 -0800
Subject: [PATCH 2/5] clang format

---
 sycl/source/detail/config.cpp        |  4 ++--
 sycl/source/detail/device_filter.cpp | 14 ++++++--------
 2 files changed, 8 insertions(+), 10 deletions(-)

diff --git a/sycl/source/detail/config.cpp b/sycl/source/detail/config.cpp
index 2a879240380da..99d951c4ff5c1 100644
--- a/sycl/source/detail/config.cpp
+++ b/sycl/source/detail/config.cpp
@@ -166,8 +166,8 @@ void dumpConfig() {
 // TODO: host device type will be removed once sycl_ext_oneapi_filter_selector
 // is removed.
 // TODO: At some point, we should also align the inputs of SYCL_DEVICE_ALLOWLIST
-// and ONEAPI_DEVICE_SELECTOR. Currently, SYCL_DEVICE_ALLOWLIST accepts 'acc' while
-// ONEAPI_DEVICE_SELECTOR accepts 'fpga'.
+// and ONEAPI_DEVICE_SELECTOR. Currently, SYCL_DEVICE_ALLOWLIST accepts 'acc'
+// while ONEAPI_DEVICE_SELECTOR accepts 'fpga'.
 const std::array<std::pair<std::string, info::device_type>, 5> &
 getODSDeviceTypeMap() {
   static const std::array<std::pair<std::string, info::device_type>, 5>
diff --git a/sycl/source/detail/device_filter.cpp b/sycl/source/detail/device_filter.cpp
index b23b588ef3355..88df701293c33 100644
--- a/sycl/source/detail/device_filter.cpp
+++ b/sycl/source/detail/device_filter.cpp
@@ -92,17 +92,17 @@ static void Parse_ODS_Device(ods_target &Target,
 
   std::string_view TopDeviceStr = DeviceSubTuple[0];
 
-  #ifdef __INTEL_PREVIEW_BREAKING_CHANGES
+#ifdef __INTEL_PREVIEW_BREAKING_CHANGES
   // Handle explicit device type (e.g. 'gpu').
   auto DeviceTypeMap =
       getODSDeviceTypeMap(); // <-- std::array<std::pair<std::string,
-                              // info::device::type>>
-  #else
+                             // info::device::type>>
+#else
   // Handle explicit device type (e.g. 'gpu').
   auto DeviceTypeMap =
       getSyclDeviceTypeMap(); // <-- std::array<std::pair<std::string,
                               // info::device::type>>
-  #endif
+#endif
 
   auto It =
       std::find_if(std::begin(DeviceTypeMap), std::end(DeviceTypeMap),
@@ -271,11 +271,9 @@ std::ostream &operator<<(std::ostream &Out, const ods_target &Target) {
   Out << Target.Backend;
   if (Target.DeviceType) {
 #ifdef __INTEL_PREVIEW_BREAKING_CHANGES
-  auto DeviceTypeMap =
-      getODSDeviceTypeMap();
+    auto DeviceTypeMap = getODSDeviceTypeMap();
 #else
-  auto DeviceTypeMap =
-      getSyclDeviceTypeMap();
+    auto DeviceTypeMap = getSyclDeviceTypeMap();
 #endif
     auto Match = std::find_if(
         DeviceTypeMap.begin(), DeviceTypeMap.end(),

From 199676a84c2819f3b7caaf9835771474f6d0628a Mon Sep 17 00:00:00 2001
From: "Agarwal, Udit" <udit.agarwal@intel.com>
Date: Wed, 7 Feb 2024 12:18:16 -0800
Subject: [PATCH 3/5] Refactoring

---
 sycl/source/detail/allowlist.cpp            |  4 +--
 sycl/source/detail/config.cpp               | 38 ++-------------------
 sycl/source/detail/config.hpp               | 16 +++------
 sycl/source/detail/device_filter.cpp        | 29 +++++++---------
 sycl/unittests/allowlist/ParseAllowList.cpp |  2 +-
 5 files changed, 23 insertions(+), 66 deletions(-)

diff --git a/sycl/source/detail/allowlist.cpp b/sycl/source/detail/allowlist.cpp
index 881a014c4831f..876fda9185fd1 100644
--- a/sycl/source/detail/allowlist.cpp
+++ b/sycl/source/detail/allowlist.cpp
@@ -166,7 +166,7 @@ AllowListParsedT parseAllowList(const std::string &AllowListRaw) {
         // valid. E.g., for BackendName key, the allowed values are only ones
         // described in SyclBeMap
         ValidateEnumValues(BackendNameKeyName, getSyclBeMap());
-        ValidateEnumValues(DeviceTypeKeyName, getSyclDeviceTypeMap());
+        ValidateEnumValues(DeviceTypeKeyName, getSyclDeviceTypeMap(true /*Enable 'acc'*/));
 
         if (Key == DeviceVendorIdKeyName) {
           // DeviceVendorId should have hex format
@@ -380,7 +380,7 @@ void applyAllowList(std::vector<sycl::detail::pi::PiDevice> &PiDevices,
         Device, PI_DEVICE_INFO_TYPE, sizeof(sycl::detail::pi::PiDeviceType),
         &PiDevType, nullptr);
     sycl::info::device_type DeviceType = pi::cast<info::device_type>(PiDevType);
-    for (const auto &SyclDeviceType : getSyclDeviceTypeMap()) {
+    for (const auto &SyclDeviceType : getSyclDeviceTypeMap(true /*Enable 'acc'*/)) {
       if (SyclDeviceType.second == DeviceType) {
         const auto &DeviceTypeValue = SyclDeviceType.first;
         DeviceDesc[DeviceTypeKeyName] = DeviceTypeValue;
diff --git a/sycl/source/detail/config.cpp b/sycl/source/detail/config.cpp
index 99d951c4ff5c1..9dda474f246d5 100644
--- a/sycl/source/detail/config.cpp
+++ b/sycl/source/detail/config.cpp
@@ -161,53 +161,21 @@ void dumpConfig() {
 #undef CONFIG
 }
 
-#ifdef __INTEL_PREVIEW_BREAKING_CHANGES
-// Array is used by ONEAPI_DEVICE_SELECTOR.
-// TODO: host device type will be removed once sycl_ext_oneapi_filter_selector
-// is removed.
-// TODO: At some point, we should also align the inputs of SYCL_DEVICE_ALLOWLIST
-// and ONEAPI_DEVICE_SELECTOR. Currently, SYCL_DEVICE_ALLOWLIST accepts 'acc'
-// while ONEAPI_DEVICE_SELECTOR accepts 'fpga'.
-const std::array<std::pair<std::string, info::device_type>, 5> &
-getODSDeviceTypeMap() {
-  static const std::array<std::pair<std::string, info::device_type>, 5>
-      SyclDeviceTypeMap = {{{"host", info::device_type::host},
-                            {"cpu", info::device_type::cpu},
-                            {"gpu", info::device_type::gpu},
-                            {"fpga", info::device_type::accelerator},
-                            {"*", info::device_type::all}}};
-  return SyclDeviceTypeMap;
-}
-
-// Array is used by SYCL_DEVICE_ALLOWLIST.
-// TODO: host device type will be removed once sycl_ext_oneapi_filter_selector
-// is removed.
-const std::array<std::pair<std::string, info::device_type>, 5> &
-getSyclDeviceTypeMap() {
-  static const std::array<std::pair<std::string, info::device_type>, 5>
-      SyclDeviceTypeMap = {{{"host", info::device_type::host},
-                            {"cpu", info::device_type::cpu},
-                            {"gpu", info::device_type::gpu},
-                            {"acc", info::device_type::accelerator},
-                            {"*", info::device_type::all}}};
-  return SyclDeviceTypeMap;
-}
-#else
 // Array is used by SYCL_DEVICE_ALLOWLIST and ONEAPI_DEVICE_SELECTOR.
 // TODO: host device type will be removed once sycl_ext_oneapi_filter_selector
 // is removed.
 const std::array<std::pair<std::string, info::device_type>, 6> &
-getSyclDeviceTypeMap() {
+getSyclDeviceTypeMap(bool supportAcc) {
   static const std::array<std::pair<std::string, info::device_type>, 6>
       SyclDeviceTypeMap = {{{"host", info::device_type::host},
                             {"cpu", info::device_type::cpu},
                             {"gpu", info::device_type::gpu},
-                            {"acc", info::device_type::accelerator},
+                            /* Duplicate entries is fine as this map is one-directional.*/
+                            {supportAcc ? "acc":"fpga", info::device_type::accelerator},
                             {"fpga", info::device_type::accelerator},
                             {"*", info::device_type::all}}};
   return SyclDeviceTypeMap;
 }
-#endif
 
 // Array is used by SYCL_DEVICE_FILTER and SYCL_DEVICE_ALLOWLIST and
 // ONEAPI_DEVICE_SELECTOR
diff --git a/sycl/source/detail/config.hpp b/sycl/source/detail/config.hpp
index 4e45a4a7af72b..1079f32caa388 100644
--- a/sycl/source/detail/config.hpp
+++ b/sycl/source/detail/config.hpp
@@ -231,19 +231,11 @@ template <> class SYCLConfig<SYCL_PARALLEL_FOR_RANGE_ROUNDING_PARAMS> {
   }
 };
 
-#ifdef __INTEL_PREVIEW_BREAKING_CHANGES
-// Array is used by ONEAPI_DEVICE_SELECTOR.
-const std::array<std::pair<std::string, info::device_type>, 5> &
-getODSDeviceTypeMap();
-
-// Array is used by SYCL_DEVICE_ALLOWLIST.
-const std::array<std::pair<std::string, info::device_type>, 5> &
-getSyclDeviceTypeMap();
-#else
 // Array is used by SYCL_DEVICE_ALLOWLIST and ONEAPI_DEVICE_SELECTOR.
+// The 'supportAcc' parameter is used by SYCL_DEVICE_ALLOWLIST which,
+// unlike ONEAPI_DEVICE_SELECTOR, also accepts 'acc' as a valid device type.
 const std::array<std::pair<std::string, info::device_type>, 6> &
-getSyclDeviceTypeMap();
-#endif
+getSyclDeviceTypeMap(bool supportAcc = false);
 
 // Array is used by SYCL_DEVICE_FILTER and SYCL_DEVICE_ALLOWLIST and
 // ONEAPI_DEVICE_SELECTOR
@@ -524,7 +516,7 @@ template <> class SYCLConfig<SYCL_REDUCTION_PREFERRED_WORKGROUP_SIZE> {
       return Result;
 
     std::string ValueStr{ValueRaw};
-    auto DeviceTypeMap = getSyclDeviceTypeMap();
+    auto DeviceTypeMap = getSyclDeviceTypeMap(true /*Enable 'acc'*/);
 
     // Iterate over all configurations.
     size_t Start = 0, End = 0;
diff --git a/sycl/source/detail/device_filter.cpp b/sycl/source/detail/device_filter.cpp
index 88df701293c33..f21bc68b16993 100644
--- a/sycl/source/detail/device_filter.cpp
+++ b/sycl/source/detail/device_filter.cpp
@@ -92,17 +92,14 @@ static void Parse_ODS_Device(ods_target &Target,
 
   std::string_view TopDeviceStr = DeviceSubTuple[0];
 
-#ifdef __INTEL_PREVIEW_BREAKING_CHANGES
   // Handle explicit device type (e.g. 'gpu').
   auto DeviceTypeMap =
-      getODSDeviceTypeMap(); // <-- std::array<std::pair<std::string,
-                             // info::device::type>>
-#else
-  // Handle explicit device type (e.g. 'gpu').
-  auto DeviceTypeMap =
-      getSyclDeviceTypeMap(); // <-- std::array<std::pair<std::string,
+      getSyclDeviceTypeMap(
+        #ifndef __INTEL_PREVIEW_BREAKING_CHANGES
+          true /*Enable 'acc'*/
+        #endif
+      ); // <-- std::array<std::pair<std::string,
                               // info::device::type>>
-#endif
 
   auto It =
       std::find_if(std::begin(DeviceTypeMap), std::end(DeviceTypeMap),
@@ -270,11 +267,11 @@ Parse_ONEAPI_DEVICE_SELECTOR(const std::string &envString) {
 std::ostream &operator<<(std::ostream &Out, const ods_target &Target) {
   Out << Target.Backend;
   if (Target.DeviceType) {
-#ifdef __INTEL_PREVIEW_BREAKING_CHANGES
-    auto DeviceTypeMap = getODSDeviceTypeMap();
-#else
-    auto DeviceTypeMap = getSyclDeviceTypeMap();
-#endif
+    auto DeviceTypeMap = getSyclDeviceTypeMap(
+      #ifndef __INTEL_PREVIEW_BREAKING_CHANGES
+          true /*Enable 'acc'*/
+      #endif
+    );
     auto Match = std::find_if(
         DeviceTypeMap.begin(), DeviceTypeMap.end(),
         [&](auto Pair) { return (Pair.second == Target.DeviceType); });
@@ -347,11 +344,11 @@ device_filter::device_filter(const std::string &FilterString) {
   if (TripleValueID >= Tokens.size()) {
     DeviceType = info::device_type::all;
   } else {
-    auto Iter = std::find_if(std::begin(getSyclDeviceTypeMap()),
-                             std::end(getSyclDeviceTypeMap()), FindElement);
+    auto Iter = std::find_if(std::begin(getSyclDeviceTypeMap(true /*Enable 'acc'*/)),
+                             std::end(getSyclDeviceTypeMap(true /*Enable 'acc'*/)), FindElement);
     // If no match is found, set device_type 'all',
     // which actually means 'any device_type' will be a match.
-    if (Iter == getSyclDeviceTypeMap().end())
+    if (Iter == getSyclDeviceTypeMap(true /*Enable 'acc'*/).end())
       DeviceType = info::device_type::all;
     else {
       DeviceType = Iter->second;
diff --git a/sycl/unittests/allowlist/ParseAllowList.cpp b/sycl/unittests/allowlist/ParseAllowList.cpp
index faecab30aaeaf..ebff0691eef85 100644
--- a/sycl/unittests/allowlist/ParseAllowList.cpp
+++ b/sycl/unittests/allowlist/ParseAllowList.cpp
@@ -178,7 +178,7 @@ TEST(ParseAllowListTests, CheckAllValidBackendNameValuesAreProcessed) {
 
 TEST(ParseAllowListTests, CheckAllValidDeviceTypeValuesAreProcessed) {
   std::string AllowList;
-  for (const auto &SyclDeviceType : sycl::detail::getSyclDeviceTypeMap()) {
+  for (const auto &SyclDeviceType : sycl::detail::getSyclDeviceTypeMap(true /*Enable 'acc'*/)) {
     if (!AllowList.empty())
       AllowList += "|";
     AllowList += "DeviceType:" + SyclDeviceType.first;

From 539a32e36bf3afae7d8b680e1bfb99b1688d0585 Mon Sep 17 00:00:00 2001
From: "Agarwal, Udit" <udit.agarwal@intel.com>
Date: Wed, 7 Feb 2024 12:19:58 -0800
Subject: [PATCH 4/5] clang-format

---
 sycl/source/detail/allowlist.cpp            |  6 ++++--
 sycl/source/detail/config.cpp               | 15 +++++++------
 sycl/source/detail/device_filter.cpp        | 24 ++++++++++-----------
 sycl/unittests/allowlist/ParseAllowList.cpp |  3 ++-
 4 files changed, 26 insertions(+), 22 deletions(-)

diff --git a/sycl/source/detail/allowlist.cpp b/sycl/source/detail/allowlist.cpp
index 876fda9185fd1..83309ec9f2d92 100644
--- a/sycl/source/detail/allowlist.cpp
+++ b/sycl/source/detail/allowlist.cpp
@@ -166,7 +166,8 @@ AllowListParsedT parseAllowList(const std::string &AllowListRaw) {
         // valid. E.g., for BackendName key, the allowed values are only ones
         // described in SyclBeMap
         ValidateEnumValues(BackendNameKeyName, getSyclBeMap());
-        ValidateEnumValues(DeviceTypeKeyName, getSyclDeviceTypeMap(true /*Enable 'acc'*/));
+        ValidateEnumValues(DeviceTypeKeyName,
+                           getSyclDeviceTypeMap(true /*Enable 'acc'*/));
 
         if (Key == DeviceVendorIdKeyName) {
           // DeviceVendorId should have hex format
@@ -380,7 +381,8 @@ void applyAllowList(std::vector<sycl::detail::pi::PiDevice> &PiDevices,
         Device, PI_DEVICE_INFO_TYPE, sizeof(sycl::detail::pi::PiDeviceType),
         &PiDevType, nullptr);
     sycl::info::device_type DeviceType = pi::cast<info::device_type>(PiDevType);
-    for (const auto &SyclDeviceType : getSyclDeviceTypeMap(true /*Enable 'acc'*/)) {
+    for (const auto &SyclDeviceType :
+         getSyclDeviceTypeMap(true /*Enable 'acc'*/)) {
       if (SyclDeviceType.second == DeviceType) {
         const auto &DeviceTypeValue = SyclDeviceType.first;
         DeviceDesc[DeviceTypeKeyName] = DeviceTypeValue;
diff --git a/sycl/source/detail/config.cpp b/sycl/source/detail/config.cpp
index 9dda474f246d5..c9e093318e705 100644
--- a/sycl/source/detail/config.cpp
+++ b/sycl/source/detail/config.cpp
@@ -167,13 +167,14 @@ void dumpConfig() {
 const std::array<std::pair<std::string, info::device_type>, 6> &
 getSyclDeviceTypeMap(bool supportAcc) {
   static const std::array<std::pair<std::string, info::device_type>, 6>
-      SyclDeviceTypeMap = {{{"host", info::device_type::host},
-                            {"cpu", info::device_type::cpu},
-                            {"gpu", info::device_type::gpu},
-                            /* Duplicate entries is fine as this map is one-directional.*/
-                            {supportAcc ? "acc":"fpga", info::device_type::accelerator},
-                            {"fpga", info::device_type::accelerator},
-                            {"*", info::device_type::all}}};
+      SyclDeviceTypeMap = {
+          {{"host", info::device_type::host},
+           {"cpu", info::device_type::cpu},
+           {"gpu", info::device_type::gpu},
+           /* Duplicate entries is fine as this map is one-directional.*/
+           {supportAcc ? "acc" : "fpga", info::device_type::accelerator},
+           {"fpga", info::device_type::accelerator},
+           {"*", info::device_type::all}}};
   return SyclDeviceTypeMap;
 }
 
diff --git a/sycl/source/detail/device_filter.cpp b/sycl/source/detail/device_filter.cpp
index f21bc68b16993..eb3d0f83ed26e 100644
--- a/sycl/source/detail/device_filter.cpp
+++ b/sycl/source/detail/device_filter.cpp
@@ -93,13 +93,12 @@ static void Parse_ODS_Device(ods_target &Target,
   std::string_view TopDeviceStr = DeviceSubTuple[0];
 
   // Handle explicit device type (e.g. 'gpu').
-  auto DeviceTypeMap =
-      getSyclDeviceTypeMap(
-        #ifndef __INTEL_PREVIEW_BREAKING_CHANGES
-          true /*Enable 'acc'*/
-        #endif
-      ); // <-- std::array<std::pair<std::string,
-                              // info::device::type>>
+  auto DeviceTypeMap = getSyclDeviceTypeMap(
+#ifndef __INTEL_PREVIEW_BREAKING_CHANGES
+      true /*Enable 'acc'*/
+#endif
+  ); // <-- std::array<std::pair<std::string,
+     // info::device::type>>
 
   auto It =
       std::find_if(std::begin(DeviceTypeMap), std::end(DeviceTypeMap),
@@ -268,9 +267,9 @@ std::ostream &operator<<(std::ostream &Out, const ods_target &Target) {
   Out << Target.Backend;
   if (Target.DeviceType) {
     auto DeviceTypeMap = getSyclDeviceTypeMap(
-      #ifndef __INTEL_PREVIEW_BREAKING_CHANGES
-          true /*Enable 'acc'*/
-      #endif
+#ifndef __INTEL_PREVIEW_BREAKING_CHANGES
+        true /*Enable 'acc'*/
+#endif
     );
     auto Match = std::find_if(
         DeviceTypeMap.begin(), DeviceTypeMap.end(),
@@ -344,8 +343,9 @@ device_filter::device_filter(const std::string &FilterString) {
   if (TripleValueID >= Tokens.size()) {
     DeviceType = info::device_type::all;
   } else {
-    auto Iter = std::find_if(std::begin(getSyclDeviceTypeMap(true /*Enable 'acc'*/)),
-                             std::end(getSyclDeviceTypeMap(true /*Enable 'acc'*/)), FindElement);
+    auto Iter = std::find_if(
+        std::begin(getSyclDeviceTypeMap(true /*Enable 'acc'*/)),
+        std::end(getSyclDeviceTypeMap(true /*Enable 'acc'*/)), FindElement);
     // If no match is found, set device_type 'all',
     // which actually means 'any device_type' will be a match.
     if (Iter == getSyclDeviceTypeMap(true /*Enable 'acc'*/).end())
diff --git a/sycl/unittests/allowlist/ParseAllowList.cpp b/sycl/unittests/allowlist/ParseAllowList.cpp
index ebff0691eef85..40fbceb76616e 100644
--- a/sycl/unittests/allowlist/ParseAllowList.cpp
+++ b/sycl/unittests/allowlist/ParseAllowList.cpp
@@ -178,7 +178,8 @@ TEST(ParseAllowListTests, CheckAllValidBackendNameValuesAreProcessed) {
 
 TEST(ParseAllowListTests, CheckAllValidDeviceTypeValuesAreProcessed) {
   std::string AllowList;
-  for (const auto &SyclDeviceType : sycl::detail::getSyclDeviceTypeMap(true /*Enable 'acc'*/)) {
+  for (const auto &SyclDeviceType :
+       sycl::detail::getSyclDeviceTypeMap(true /*Enable 'acc'*/)) {
     if (!AllowList.empty())
       AllowList += "|";
     AllowList += "DeviceType:" + SyclDeviceType.first;

From 4828947140f52ab51d544ad54c86ef8d4029d769 Mon Sep 17 00:00:00 2001
From: "Agarwal, Udit" <udit.agarwal@intel.com>
Date: Wed, 7 Feb 2024 12:21:26 -0800
Subject: [PATCH 5/5] typo

---
 sycl/source/detail/config.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sycl/source/detail/config.cpp b/sycl/source/detail/config.cpp
index c9e093318e705..7ae96d42e220d 100644
--- a/sycl/source/detail/config.cpp
+++ b/sycl/source/detail/config.cpp
@@ -171,7 +171,7 @@ getSyclDeviceTypeMap(bool supportAcc) {
           {{"host", info::device_type::host},
            {"cpu", info::device_type::cpu},
            {"gpu", info::device_type::gpu},
-           /* Duplicate entries is fine as this map is one-directional.*/
+           /* Duplicate entries are fine as this map is one-directional.*/
            {supportAcc ? "acc" : "fpga", info::device_type::accelerator},
            {"fpga", info::device_type::accelerator},
            {"*", info::device_type::all}}};