diff --git a/sycl/source/detail/config.cpp b/sycl/source/detail/config.cpp index 68137d19630fa..f7760aa227168 100644 --- a/sycl/source/detail/config.cpp +++ b/sycl/source/detail/config.cpp @@ -161,21 +161,7 @@ void dumpConfig() { #undef CONFIG } -// Array is used by ONEAPI_DEVICE_SELECTOR. -// TODO: host device type will be removed once sycl_ext_oneapi_filter_selector -// is removed. -const std::array, 5> & -getODSDeviceTypeMap() { - static const std::array, 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. +// 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, 6> & diff --git a/sycl/source/detail/config.hpp b/sycl/source/detail/config.hpp index fc3419672409c..8f048e0f95f60 100644 --- a/sycl/source/detail/config.hpp +++ b/sycl/source/detail/config.hpp @@ -231,11 +231,7 @@ template <> class SYCLConfig { } }; -// Array is used by ONEAPI_DEVICE_SELECTOR. -const std::array, 5> & -getODSDeviceTypeMap(); - -// Array is used by SYCL_DEVICE_ALLOWLIST. +// Array is used by SYCL_DEVICE_ALLOWLIST and ONEAPI_DEVICE_SELECTOR. const std::array, 6> & getSyclDeviceTypeMap(); diff --git a/sycl/source/detail/device_filter.cpp b/sycl/source/detail/device_filter.cpp index 15360afdbcae4..311ebeaa174b8 100644 --- a/sycl/source/detail/device_filter.cpp +++ b/sycl/source/detail/device_filter.cpp @@ -94,8 +94,8 @@ static void Parse_ODS_Device(ods_target &Target, // Handle explicit device type (e.g. 'gpu'). auto DeviceTypeMap = - getODSDeviceTypeMap(); // <-- std::array> + getSyclDeviceTypeMap(); // <-- std::array> auto It = std::find_if(std::begin(DeviceTypeMap), std::end(DeviceTypeMap), [&](auto DtPair) { return TopDeviceStr == DtPair.first; }); @@ -262,7 +262,7 @@ 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 = getODSDeviceTypeMap(); + auto DeviceTypeMap = getSyclDeviceTypeMap(); auto Match = std::find_if( DeviceTypeMap.begin(), DeviceTypeMap.end(), [&](auto Pair) { return (Pair.second == Target.DeviceType); });