diff --git a/sycl/include/sycl/platform.hpp b/sycl/include/sycl/platform.hpp index cc99804680487..0d10080e00142 100644 --- a/sycl/include/sycl/platform.hpp +++ b/sycl/include/sycl/platform.hpp @@ -194,11 +194,6 @@ class __SYCL_EXPORT platform : public detail::OwnerLessBase { /// \return a vector of all available SYCL platforms. static std::vector get_platforms(); - /// Returns all unsupported (non-SYCL) platforms in the system. - /// - /// \return a vector of all unsupported non-SYCL platforms. - static std::vector get_unsupported_platforms(); - /// Returns the backend associated with this platform. /// /// \return the backend associated with this platform diff --git a/sycl/source/detail/platform_impl.cpp b/sycl/source/detail/platform_impl.cpp index 652e47a5be997..f10bab751854d 100644 --- a/sycl/source/detail/platform_impl.cpp +++ b/sycl/source/detail/platform_impl.cpp @@ -138,24 +138,6 @@ std::vector platform_impl::getAdapterPlatforms(AdapterPtr &Adapter, return Platforms; } -std::vector platform_impl::get_unsupported_platforms() { - std::vector UnsupportedPlatforms; - - std::vector &Adapters = sycl::detail::ur::initializeUr(); - // Ignore UR as it has to be supported. - for (auto &Adapter : Adapters) { - if (Adapter->hasBackend(backend::all)) { - continue; // skip UR - } - std::vector AdapterPlatforms = - getAdapterPlatforms(Adapter, /*Supported=*/false); - std::copy(AdapterPlatforms.begin(), AdapterPlatforms.end(), - std::back_inserter(UnsupportedPlatforms)); - } - - return UnsupportedPlatforms; -} - // This routine has the side effect of registering each platform's last device // id into each adapter, which is used for device counting. std::vector platform_impl::get_platforms() { diff --git a/sycl/source/detail/platform_impl.hpp b/sycl/source/detail/platform_impl.hpp index 130018417eebf..b1f38ca574980 100644 --- a/sycl/source/detail/platform_impl.hpp +++ b/sycl/source/detail/platform_impl.hpp @@ -124,11 +124,6 @@ class platform_impl { /// \return a vector of all available SYCL platforms. static std::vector get_platforms(); - /// Returns all unsupported (non-SYCL) platforms in the system. - /// - /// \return a vector of all unsupported (non-SYCL) platforms. - static std::vector get_unsupported_platforms(); - // \return the Adapter associated with this platform. const AdapterPtr &getAdapter() const { return MAdapter; } diff --git a/sycl/source/platform.cpp b/sycl/source/platform.cpp index 965a8625c1ebf..5d24743ac3587 100644 --- a/sycl/source/platform.cpp +++ b/sycl/source/platform.cpp @@ -52,10 +52,6 @@ std::vector platform::get_platforms() { return detail::platform_impl::get_platforms(); } -std::vector platform::get_unsupported_platforms() { - return detail::platform_impl::get_unsupported_platforms(); -} - backend platform::get_backend() const noexcept { return impl->getBackend(); } template diff --git a/sycl/test-e2e/Plugin/sycl-ls-banned.cpp b/sycl/test-e2e/Plugin/sycl-ls-banned.cpp deleted file mode 100644 index 5528164c42628..0000000000000 --- a/sycl/test-e2e/Plugin/sycl-ls-banned.cpp +++ /dev/null @@ -1,16 +0,0 @@ -// REQUIRES: cuda - -// RUN: sycl-ls --verbose >%t.cuda.out -// RUN: FileCheck %s --input-file %t.cuda.out - -//==---- sycl-ls-banned.cpp - Check sycl-ls output of banned platforms. --==// -// -// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. -// See https://llvm.org/LICENSE.txt for license information. -// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception -// -//===----------------------------------------------------------------------===// - -// CHECK: Unsupported Platforms: -// CHECK-NEXT: Platform [#1]: -// CHECK-NEXT: Version : OpenCL diff --git a/sycl/test-e2e/Plugin/sycl-ls.cpp b/sycl/test-e2e/Plugin/sycl-ls.cpp index 89f340600baaa..1632d7f1e5cd9 100644 --- a/sycl/test-e2e/Plugin/sycl-ls.cpp +++ b/sycl/test-e2e/Plugin/sycl-ls.cpp @@ -1,4 +1,4 @@ -// RUN: sycl-ls --verbose | awk '{print}/Unsupported Platforms:/{exit}' | grep "Device \[" | wc -l >%t.verbose.out +// RUN: sycl-ls --verbose | grep "Device \[" | wc -l >%t.verbose.out // RUN: sycl-ls | wc -l >%t.concise.out // RUN: diff %t.verbose.out %t.concise.out diff --git a/sycl/test/abi/sycl_symbols_linux.dump b/sycl/test/abi/sycl_symbols_linux.dump index ec6ec2096403f..bf5542036a2e2 100644 --- a/sycl/test/abi/sycl_symbols_linux.dump +++ b/sycl/test/abi/sycl_symbols_linux.dump @@ -3545,7 +3545,6 @@ _ZN4sycl3_V17samplerC1EP11_cl_samplerRKNS0_7contextE _ZN4sycl3_V17samplerC2ENS0_29coordinate_normalization_modeENS0_15addressing_modeENS0_14filtering_modeERKNS0_13property_listE _ZN4sycl3_V17samplerC2EP11_cl_samplerRKNS0_7contextE _ZN4sycl3_V18platform13get_platformsEv -_ZN4sycl3_V18platform25get_unsupported_platformsEv _ZN4sycl3_V18platformC1EP15_cl_platform_id _ZN4sycl3_V18platformC1ERKNS0_15device_selectorE _ZN4sycl3_V18platformC1ERKNS0_6deviceE diff --git a/sycl/test/abi/sycl_symbols_windows.dump b/sycl/test/abi/sycl_symbols_windows.dump index 55ce460c64559..17a1e6b9fc167 100644 --- a/sycl/test/abi/sycl_symbols_windows.dump +++ b/sycl/test/abi/sycl_symbols_windows.dump @@ -4035,7 +4035,6 @@ ?get_platform@context@_V1@sycl@@QEBA?AVplatform@23@XZ ?get_platform@device@_V1@sycl@@QEBA?AVplatform@23@XZ ?get_platforms@platform@_V1@sycl@@SA?AV?$vector@Vplatform@_V1@sycl@@V?$allocator@Vplatform@_V1@sycl@@@std@@@std@@XZ -?get_unsupported_platforms@platform@_V1@sycl@@SA?AV?$vector@Vplatform@_V1@sycl@@V?$allocator@Vplatform@_V1@sycl@@@std@@@std@@XZ ?get_pointer_device@_V1@sycl@@YA?AVdevice@12@PEBXAEBVcontext@12@@Z ?get_pointer_type@_V1@sycl@@YA?AW4alloc@usm@12@PEBXAEBVcontext@12@@Z ?get_precision@stream@_V1@sycl@@QEBA_KXZ diff --git a/sycl/tools/sycl-ls/sycl-ls.cpp b/sycl/tools/sycl-ls/sycl-ls.cpp index 0ab8d7bec456b..0c6281bc0dc47 100644 --- a/sycl/tools/sycl-ls/sycl-ls.cpp +++ b/sycl/tools/sycl-ls/sycl-ls.cpp @@ -14,9 +14,7 @@ // verbose (enabled with --verbose). // // In verbose mode it also prints, which devices would be chosen by various SYCL -// device selectors. If the system has unsupported platforms (for instance -// CUDA's OpenCL) those will also be listed in verbose mode, under "Unsupported -// Platforms". +// device selectors. // #include @@ -124,8 +122,7 @@ std::array GetNumberOfSubAndSubSubDevices(const device &Device) { } static void printDeviceInfo(const device &Device, bool Verbose, - const std::string &Prepend, - bool IsUnsupported = false) { + const std::string &Prepend) { auto DeviceVersion = Device.get_info(); auto DeviceName = Device.get_info(); auto DeviceVendor = Device.get_info(); @@ -160,23 +157,19 @@ static void printDeviceInfo(const device &Device, bool Verbose, << std::endl; } - // We don't expect to find info on aspects, device's sub-group size or - // architecture on non supported devices. - if (!IsUnsupported) { - std::cout << Prepend << "Aspects :"; + std::cout << Prepend << "Aspects :"; #define __SYCL_ASPECT(ASPECT, ID) \ if (Device.has(aspect::ASPECT)) \ std::cout << " " << #ASPECT; #include - std::cout << std::endl; - auto sg_sizes = Device.get_info(); - std::cout << Prepend << "info::device::sub_group_sizes:"; - for (auto size : sg_sizes) - std::cout << " " << size; - std::cout << std::endl; - std::cout << Prepend << "Architecture: " << getArchName(Device) - << std::endl; - } + std::cout << std::endl; + auto sg_sizes = Device.get_info(); + std::cout << Prepend << "info::device::sub_group_sizes:"; + for (auto size : sg_sizes) + std::cout << " " << size; + std::cout << std::endl; + std::cout << Prepend << "Architecture: " << getArchName(Device) + << std::endl; } else { std::cout << Prepend << ", " << DeviceName << " " << DeviceVersion << " [" << DeviceDriverVersion << "]" << std::endl; @@ -208,11 +201,8 @@ static int printUsageAndExit() { << std::endl; std::cout << "\n Options:" << std::endl; std::cout - << "\t --verbose " - << "\t Verbosely prints all the discovered platforms. " - << "It also lists the device chosen by various SYCL device " - "selectors. If the system contains unsupported platforms, those will " - "also be listed in verbose mode, under \"Unsupported Platforms\"." + << "\t --verbose " << "\t Verbosely prints all the discovered platforms. " + << "It also lists the device chosen by various SYCL device selectors." << std::endl; std::cout << "\t --ignore-device-selectors " @@ -327,38 +317,6 @@ static int unsetFilterEnvVarsAndFork() { } #endif -// NOTE: This function can update DeviceNums. -static void printVerbosePlatformInfo(const std::vector &Platforms, - std::map &DeviceNums, - const bool SuppressNumberPrinting, - bool IsUnsupported = false) { - uint32_t PlatformNum = 0; - if (!SuppressNumberPrinting) - DeviceNums.clear(); - for (const auto &Platform : Platforms) { - backend Backend = Platform.get_backend(); - ++PlatformNum; - auto PlatformVersion = Platform.get_info(); - auto PlatformName = Platform.get_info(); - auto PlatformVendor = Platform.get_info(); - std::cout << "Platform [#" << PlatformNum << "]:" << std::endl; - std::cout << " Version : " << PlatformVersion << std::endl; - std::cout << " Name : " << PlatformName << std::endl; - std::cout << " Vendor : " << PlatformVendor << std::endl; - - const auto &Devices = Platform.get_devices(); - std::cout << " Devices : " << Devices.size() << std::endl; - for (const auto &Device : Devices) { - if (!SuppressNumberPrinting) { - std::cout << " Device [#" << DeviceNums[Backend] - << "]:" << std::endl; - ++DeviceNums[Backend]; - } - printDeviceInfo(Device, true, " ", IsUnsupported); - } - } -} - int main(int argc, char **argv) { if (argc == 1) { @@ -428,14 +386,31 @@ int main(int argc, char **argv) { if (verbose) { std::cout << "\nPlatforms: " << Platforms.size() << std::endl; - printVerbosePlatformInfo(Platforms, DeviceNums, SuppressNumberPrinting); - - const auto &UnsupportedPlatforms = platform::get_unsupported_platforms(); - std::cout << "\nUnsupported Platforms: " << UnsupportedPlatforms.size() - << std::endl; - printVerbosePlatformInfo(UnsupportedPlatforms, DeviceNums, - SuppressNumberPrinting, true); - std::cout << std::endl; + uint32_t PlatformNum = 0; + if (!SuppressNumberPrinting) + DeviceNums.clear(); + for (const auto &Platform : Platforms) { + backend Backend = Platform.get_backend(); + ++PlatformNum; + auto PlatformVersion = Platform.get_info(); + auto PlatformName = Platform.get_info(); + auto PlatformVendor = Platform.get_info(); + std::cout << "Platform [#" << PlatformNum << "]:" << std::endl; + std::cout << " Version : " << PlatformVersion << std::endl; + std::cout << " Name : " << PlatformName << std::endl; + std::cout << " Vendor : " << PlatformVendor << std::endl; + + const auto &Devices = Platform.get_devices(); + std::cout << " Devices : " << Devices.size() << std::endl; + for (const auto &Device : Devices) { + if (!SuppressNumberPrinting) { + std::cout << " Device [#" << DeviceNums[Backend] + << "]:" << std::endl; + ++DeviceNums[Backend]; + } + printDeviceInfo(Device, true, " "); + } + } } else { return EXIT_SUCCESS; }