@@ -88,33 +88,6 @@ context_impl &platform_impl::khr_get_default_context() {
8888  return  *It->second ;
8989}
9090
91- static  bool  IsBannedPlatform (platform Platform) {
92-   //  The NVIDIA OpenCL platform is currently not compatible with DPC++
93-   //  since it is only 1.2 but gets selected by default in many systems
94-   //  There is also no support on the PTX backend for OpenCL consumption,
95-   //  and there have been some internal reports.
96-   //  To avoid problems on default users and deployment of DPC++ on platforms
97-   //  where CUDA is available, the OpenCL support is disabled.
98-   // 
99-   //  There is also no support for the AMD HSA backend for OpenCL consumption,
100-   //  as well as reported problems with device queries, so AMD OpenCL support
101-   //  is disabled as well.
102-   // 
103-   auto  IsMatchingOpenCL = [](platform Platform, const  std::string_view name) {
104-     const  bool  HasNameMatch = Platform.get_info <info::platform::name>().find (
105-                                   name) != std::string::npos;
106-     const  auto  Backend = detail::getSyclObjImpl (Platform)->getBackend ();
107-     const  bool  IsMatchingOCL = (HasNameMatch && Backend == backend::opencl);
108-     if  (detail::ur::trace (detail::ur::TraceLevel::TRACE_ALL) && IsMatchingOCL) {
109-       std::cout << " SYCL_UR_TRACE: "   << name
110-                 << "  OpenCL platform found but is not compatible."   << std::endl;
111-     }
112-     return  IsMatchingOCL;
113-   };
114-   return  IsMatchingOpenCL (Platform, " NVIDIA CUDA"  ) ||
115-          IsMatchingOpenCL (Platform, " AMD Accelerated Parallel Processing"  );
116- }
117- 
11891//  Get the vector of platforms supported by a given UR adapter
11992//  replace uses of this with a helper in adapter object, the adapter
12093//  objects will own the ur adapter handles and they'll need to pass them to
@@ -132,25 +105,13 @@ std::vector<platform> platform_impl::getAdapterPlatforms(adapter_impl &Adapter,
132105  for  (const  auto  &UrPlatform : UrPlatforms) {
133106    platform Platform = detail::createSyclObjFromImpl<platform>(
134107        getOrMakePlatformImpl (UrPlatform, Adapter));
135-     const  bool  IsBanned = IsBannedPlatform (Platform);
136-     bool  HasAnyDevices = false ;
137- 
138-     //  Platform.get_devices() increments the device count for the platform
139-     //  and if the platform is banned (like OpenCL for AMD), it can cause
140-     //  incorrect device numbering, when used with ONEAPI_DEVICE_SELECTOR.
141-     if  (!IsBanned)
142-       HasAnyDevices = !Platform.get_devices (info::device_type::all).empty ();
108+     bool  HasAnyDevices = !Platform.get_devices (info::device_type::all).empty ();
143109
144110    if  (!Supported) {
145-       if  (IsBanned ||  !HasAnyDevices) {
111+       if  (!HasAnyDevices) {
146112        Platforms.push_back (std::move (Platform));
147113      }
148114    } else  {
149-       if  (IsBanned) {
150-         continue ; //  bail as early as possible, otherwise banned platforms may
151-                   //  mess up device counting
152-       }
153- 
154115      //  The SYCL spec says that a platform has one or more devices. ( SYCL
155116      //  2020 4.6.2 ) If we have an empty platform, we don't report it back
156117      //  from platform::get_platforms().
0 commit comments