@@ -75,23 +75,28 @@ static bool IsBannedPlatform(platform Platform) {
75
75
// To avoid problems on default users and deployment of DPC++ on platforms
76
76
// where CUDA is available, the OpenCL support is disabled.
77
77
//
78
- auto IsNVIDIAOpenCL = [](platform Platform) {
78
+ // There is also no support for the AMD HSA backend for OpenCL consumption,
79
+ // as well as reported problems with device queries, so AMD OpenCL support
80
+ // is disabled as well.
81
+ //
82
+ auto IsMatchingOpenCL = [](platform Platform, const std::string_view name) {
79
83
if (getSyclObjImpl (Platform)->is_host ())
80
84
return false ;
81
85
82
- const bool HasCUDA = Platform.get_info <info::platform::name>().find (
83
- " NVIDIA CUDA " ) != std::string::npos;
86
+ const bool HasNameMatch = Platform.get_info <info::platform::name>().find (
87
+ name ) != std::string::npos;
84
88
const auto Backend =
85
89
detail::getSyclObjImpl (Platform)->getPlugin ().getBackend ();
86
- const bool IsCUDAOCL = (HasCUDA && Backend == backend::opencl);
87
- if (detail::pi::trace (detail::pi::TraceLevel::PI_TRACE_ALL) && IsCUDAOCL) {
88
- std::cout << " SYCL_PI_TRACE[all]: "
89
- << " NVIDIA CUDA OpenCL platform found but is not compatible. "
90
- << std::endl;
90
+ const bool IsMatchingOCL = (HasNameMatch && Backend == backend::opencl);
91
+ if (detail::pi::trace (detail::pi::TraceLevel::PI_TRACE_ALL) &&
92
+ IsMatchingOCL) {
93
+ std::cout << " SYCL_PI_TRACE[all]: " << name
94
+ << " OpenCL platform found but is not compatible. " << std::endl;
91
95
}
92
- return IsCUDAOCL ;
96
+ return IsMatchingOCL ;
93
97
};
94
- return IsNVIDIAOpenCL (Platform);
98
+ return IsMatchingOpenCL (Platform, " NVIDIA CUDA" ) ||
99
+ IsMatchingOpenCL (Platform, " AMD Accelerated Parallel Processing" );
95
100
}
96
101
97
102
// This routine has the side effect of registering each platform's last device
0 commit comments