From 7f4646c1d253032f88a42a925aae38b924a8f46d Mon Sep 17 00:00:00 2001 From: Ruyman Reyes Date: Wed, 13 May 2020 06:34:50 +0000 Subject: [PATCH 01/10] [SYCL][CUDA] Improvements to CUDA device selection * Prevents NVIDIA OpenCL platform to be selected by a SYCL application * NVIDIA OpenCL is not reported as a valid GPU platform for LIT testing * Introduces device selection logic to reject devices * Changes name of NVIDIA CUDA Backend to differentiate from OpenCL * Provides better error message when SPIRV is passed to CUDA backend * Using backend types to check for CUDA backend instead of strings Signed-off-by: Ruyman Reyes --- sycl/plugins/cuda/pi_cuda.cpp | 2 +- sycl/source/detail/context_impl.cpp | 3 +- sycl/source/detail/platform_impl.cpp | 17 +++++++++- sycl/source/detail/platform_impl.hpp | 8 ----- .../program_manager/program_manager.cpp | 31 +++++-------------- sycl/source/device_selector.cpp | 20 +++++++++--- sycl/tools/get_device_count_by_type.cpp | 12 +++++++ 7 files changed, 55 insertions(+), 38 deletions(-) diff --git a/sycl/plugins/cuda/pi_cuda.cpp b/sycl/plugins/cuda/pi_cuda.cpp index 8a4d9540334a4..25d22fd03b1ad 100644 --- a/sycl/plugins/cuda/pi_cuda.cpp +++ b/sycl/plugins/cuda/pi_cuda.cpp @@ -684,7 +684,7 @@ pi_result cuda_piPlatformGetInfo(pi_platform platform, switch (param_name) { case PI_PLATFORM_INFO_NAME: return getInfo(param_value_size, param_value, param_value_size_ret, - "NVIDIA CUDA"); + "NVIDIA CUDA BACKEND"); case PI_PLATFORM_INFO_VENDOR: return getInfo(param_value_size, param_value, param_value_size_ret, "NVIDIA Corporation"); diff --git a/sycl/source/detail/context_impl.cpp b/sycl/source/detail/context_impl.cpp index 8353396e7792d..11166baaf5f27 100644 --- a/sycl/source/detail/context_impl.cpp +++ b/sycl/source/detail/context_impl.cpp @@ -41,7 +41,8 @@ context_impl::context_impl(const vector_class Devices, DeviceIds.push_back(getSyclObjImpl(D)->getHandleRef()); } - if (MPlatform->is_cuda()) { + const auto Backend = getPlugin().getBackend(); + if (Backend == backend::cuda) { #if USE_PI_CUDA const pi_context_properties props[] = {PI_CONTEXT_PROPERTIES_CUDA_PRIMARY, UseCUDAPrimaryContext, 0}; diff --git a/sycl/source/detail/platform_impl.cpp b/sycl/source/detail/platform_impl.cpp index 10fd2d0fc9aa2..7b8a8013faa32 100644 --- a/sycl/source/detail/platform_impl.cpp +++ b/sycl/source/detail/platform_impl.cpp @@ -20,6 +20,20 @@ __SYCL_INLINE_NAMESPACE(cl) { namespace sycl { namespace detail { +static bool IsBannedPlatform(platform Platform) { + auto IsNVIDIAOpenCL = [](platform Platform) { + if (Platform.is_host()) + return false; + + const bool HasCUDA = Platform.get_info().find( + "NVIDIA CUDA") != std::string::npos; + const auto Backend = + detail::getSyclObjImpl(Platform)->getPlugin().getBackend(); + return (HasCUDA && Backend == backend::opencl); + }; + return IsNVIDIAOpenCL(Platform); +} + vector_class platform_impl::get_platforms() { vector_class Platforms; vector_class Plugins = RT::initialize(); @@ -39,7 +53,8 @@ vector_class platform_impl::get_platforms() { platform Platform = detail::createSyclObjFromImpl( std::make_shared(PiPlatform, Plugins[i])); // Skip platforms which do not contain requested device types - if (!Platform.get_devices(ForcedType).empty()) + if (!Platform.get_devices(ForcedType).empty() && + !IsBannedPlatform(Platform)) Platforms.push_back(Platform); } } diff --git a/sycl/source/detail/platform_impl.hpp b/sycl/source/detail/platform_impl.hpp index 4f7f028bd695c..55c2f252b4cc3 100644 --- a/sycl/source/detail/platform_impl.hpp +++ b/sycl/source/detail/platform_impl.hpp @@ -73,14 +73,6 @@ class platform_impl { /// \return true if this SYCL platform is a host platform. bool is_host() const { return MHostPlatform; }; - bool is_cuda() const { - const string_class CUDA_PLATFORM_STRING = "NVIDIA CUDA"; - const string_class PlatformName = - get_platform_info::get(MPlatform, - getPlugin()); - return PlatformName == CUDA_PLATFORM_STRING; - } - /// \return an instance of OpenCL cl_platform_id. cl_platform_id get() const { if (is_host()) diff --git a/sycl/source/detail/program_manager/program_manager.cpp b/sycl/source/detail/program_manager/program_manager.cpp index 2abf16754b670..499d2932e9dac 100644 --- a/sycl/source/detail/program_manager/program_manager.cpp +++ b/sycl/source/detail/program_manager/program_manager.cpp @@ -86,29 +86,9 @@ static RT::PiProgram createBinaryProgram(const ContextImplPtr Context, RT::PiProgram Program; - bool IsCUDA = false; - // TODO: Implement `piProgramCreateWithBinary` to not require extra logic for // the CUDA backend. -#if USE_PI_CUDA - // All devices in a context are from the same platform. - RT::PiDevice Device = getFirstDevice(Context); - RT::PiPlatform Platform = nullptr; - Plugin.call(Device, PI_DEVICE_INFO_PLATFORM, sizeof(Platform), - &Platform, nullptr); - size_t PlatformNameSize = 0u; - Plugin.call(Platform, PI_PLATFORM_INFO_NAME, 0u, nullptr, - &PlatformNameSize); - std::vector PlatformName(PlatformNameSize, '\0'); - Plugin.call(Platform, PI_PLATFORM_INFO_NAME, - PlatformName.size(), PlatformName.data(), nullptr); - if (PlatformNameSize > 0u && - std::strncmp(PlatformName.data(), "NVIDIA CUDA", PlatformNameSize) == 0) { - IsCUDA = true; - } -#endif // USE_PI_CUDA - - if (IsCUDA) { + if (Context->getPlugin().getBackend() == backend::cuda) { // TODO: Reemplace CreateWithSource with CreateWithBinary in CUDA backend const char *SignedData = reinterpret_cast(Data); Plugin.call(Context->getHandleRef(), 1 /*one binary*/, &SignedData, @@ -259,6 +239,12 @@ RetT *getOrBuild(KernelProgramCache &KPCache, KeyT &&CacheKey, static bool isDeviceBinaryTypeSupported(const context &C, RT::PiDeviceBinaryType Format) { + backend CBackend = (detail::getSyclObjImpl(C)->getPlugin()).getBackend(); + + // The CUDA backend cannot use SPIRV + if (CBackend == backend::cuda && Format == PI_DEVICE_BINARY_TYPE_SPIRV) + return false; + // All formats except PI_DEVICE_BINARY_TYPE_SPIRV are supported. if (Format != PI_DEVICE_BINARY_TYPE_SPIRV) return true; @@ -272,7 +258,6 @@ static bool isDeviceBinaryTypeSupported(const context &C, } // OpenCL 2.1 and greater require clCreateProgramWithIL - backend CBackend = (detail::getSyclObjImpl(C)->getPlugin()).getBackend(); if ((CBackend == backend::opencl) && C.get_platform().get_info() >= "2.1") return true; @@ -337,7 +322,7 @@ RT::PiProgram ProgramManager::createPIProgram(const RTDeviceBinaryImage &Img, if (!isDeviceBinaryTypeSupported(Context, Format)) throw feature_not_supported( - "Online compilation is not supported in this context", + "SPIR-V Online compilation is not supported in this context", PI_INVALID_OPERATION); // Load the image diff --git a/sycl/source/device_selector.cpp b/sycl/source/device_selector.cpp index aba27e0c926fa..fccaf0b94aec2 100644 --- a/sycl/source/device_selector.cpp +++ b/sycl/source/device_selector.cpp @@ -30,28 +30,40 @@ static bool isDeviceOfPreferredSyclBe(const device &Device) { device device_selector::select_device() const { vector_class devices = device::get_devices(); - int score = -1; + // SYCL specification uses -1 to reject a device from selection + const int REJECT_DEVICE_SCORE = -1; + int score = REJECT_DEVICE_SCORE; const device *res = nullptr; + for (const auto &dev : devices) { - int dev_score = (*this)(dev); + int dev_score = REJECT_DEVICE_SCORE; + + dev_score = (*this)(dev); + if (detail::pi::trace(detail::pi::TraceLevel::PI_TRACE_ALL)) { string_class PlatformVersion = dev.get_info() .get_info(); string_class DeviceName = dev.get_info(); std::cout << "SYCL_PI_TRACE[all]: " - << "select_device(): -> score = " << score << std::endl + << "select_device(): -> score = " << score + << ((score == REJECT_DEVICE_SCORE) ? "(REJECTED)" : " ") + << std::endl << "SYCL_PI_TRACE[all]: " << " platform: " << PlatformVersion << std::endl << "SYCL_PI_TRACE[all]: " << " device: " << DeviceName << std::endl; } + // Device is discarded if is marked with REJECT_DEVICE_SCORE + if (dev_score == REJECT_DEVICE_SCORE) + continue; + // SYCL spec says: "If more than one device receives the high score then // one of those tied devices will be returned, but which of the devices // from the tied set is to be returned is not defined". Here we give a // preference to the device of the preferred BE. // - if (score < dev_score || + if ((score < dev_score) || (score == dev_score && isDeviceOfPreferredSyclBe(dev))) { res = &dev; score = dev_score; diff --git a/sycl/tools/get_device_count_by_type.cpp b/sycl/tools/get_device_count_by_type.cpp index 1cfec312e8883..86b5f7a4cbb37 100644 --- a/sycl/tools/get_device_count_by_type.cpp +++ b/sycl/tools/get_device_count_by_type.cpp @@ -21,6 +21,7 @@ #include #include +#include #include #include #include @@ -88,6 +89,17 @@ static bool queryOpenCL(cl_device_type deviceType, cl_uint &deviceCount, } for (cl_uint i = 0; i < platformCount; i++) { + const size_t MAX_PLATFORM_VENDOR = 100u; + char info[MAX_PLATFORM_VENDOR]; + // get platform attribute value + clGetPlatformInfo(platforms[i], CL_PLATFORM_VENDOR, MAX_PLATFORM_VENDOR, + info, NULL); + const auto IsNVIDIAOpenCL = strstr(info, "NVIDIA") != NULL; + if (IsNVIDIAOpenCL) { + // Ignore NVIDIA OpenCL platform for testing + continue; + } + cl_uint deviceCountPart = 0; iRet = clGetDeviceIDs(platforms[i], deviceType, 0, nullptr, &deviceCountPart); From aedaacca2a830cfa69a812041f80f7887839af43 Mon Sep 17 00:00:00 2001 From: Ruyman Reyes Date: Mon, 18 May 2020 14:25:28 +0000 Subject: [PATCH 02/10] [SYCL] Renamed variable as suggested by reviewers Signed-off-by: Ruyman Reyes --- sycl/source/detail/program_manager/program_manager.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sycl/source/detail/program_manager/program_manager.cpp b/sycl/source/detail/program_manager/program_manager.cpp index 499d2932e9dac..be3a63c5abb34 100644 --- a/sycl/source/detail/program_manager/program_manager.cpp +++ b/sycl/source/detail/program_manager/program_manager.cpp @@ -239,10 +239,10 @@ RetT *getOrBuild(KernelProgramCache &KPCache, KeyT &&CacheKey, static bool isDeviceBinaryTypeSupported(const context &C, RT::PiDeviceBinaryType Format) { - backend CBackend = (detail::getSyclObjImpl(C)->getPlugin()).getBackend(); + backend ContextBackend = detail::getSyclObjImpl(C)->getPlugin().getBackend(); // The CUDA backend cannot use SPIRV - if (CBackend == backend::cuda && Format == PI_DEVICE_BINARY_TYPE_SPIRV) + if (ContextBackend == backend::cuda && Format == PI_DEVICE_BINARY_TYPE_SPIRV) return false; // All formats except PI_DEVICE_BINARY_TYPE_SPIRV are supported. @@ -258,7 +258,7 @@ static bool isDeviceBinaryTypeSupported(const context &C, } // OpenCL 2.1 and greater require clCreateProgramWithIL - if ((CBackend == backend::opencl) && + if ((ContextBackend == backend::opencl) && C.get_platform().get_info() >= "2.1") return true; From 255af95dfd21699b28962971b27dcb1b1e45cb55 Mon Sep 17 00:00:00 2001 From: Ruyman Reyes Date: Mon, 18 May 2020 14:26:12 +0000 Subject: [PATCH 03/10] [SYCL] Promoted REJECT_DEVICE_SCORE as class member Signed-off-by: Ruyman Reyes --- sycl/include/CL/sycl/device_selector.hpp | 3 +++ sycl/source/device_selector.cpp | 12 ++++++------ 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/sycl/include/CL/sycl/device_selector.hpp b/sycl/include/CL/sycl/device_selector.hpp index f2ad228e2fd47..a1fb5955b59ed 100644 --- a/sycl/include/CL/sycl/device_selector.hpp +++ b/sycl/include/CL/sycl/device_selector.hpp @@ -19,6 +19,9 @@ namespace sycl { class device; class __SYCL_EXPORT device_selector { +protected: + static const int REJECT_DEVICE_SCORE = -1; + public: virtual ~device_selector() = default; diff --git a/sycl/source/device_selector.cpp b/sycl/source/device_selector.cpp index fccaf0b94aec2..11f1e574831db 100644 --- a/sycl/source/device_selector.cpp +++ b/sycl/source/device_selector.cpp @@ -31,7 +31,6 @@ static bool isDeviceOfPreferredSyclBe(const device &Device) { device device_selector::select_device() const { vector_class devices = device::get_devices(); // SYCL specification uses -1 to reject a device from selection - const int REJECT_DEVICE_SCORE = -1; int score = REJECT_DEVICE_SCORE; const device *res = nullptr; @@ -91,7 +90,7 @@ device device_selector::select_device() const { int default_selector::operator()(const device &dev) const { - int Score = -1; + int Score = REJECT_DEVICE_SCORE; // Give preference to device of SYCL BE. if (isDeviceOfPreferredSyclBe(dev)) @@ -114,7 +113,8 @@ int default_selector::operator()(const device &dev) const { } int gpu_selector::operator()(const device &dev) const { - int Score = -1; + int Score = REJECT_DEVICE_SCORE; + if (dev.is_gpu()) { Score = 1000; // Give preference to device of SYCL BE. @@ -125,7 +125,7 @@ int gpu_selector::operator()(const device &dev) const { } int cpu_selector::operator()(const device &dev) const { - int Score = -1; + int Score = REJECT_DEVICE_SCORE; if (dev.is_cpu()) { Score = 1000; // Give preference to device of SYCL BE. @@ -136,7 +136,7 @@ int cpu_selector::operator()(const device &dev) const { } int accelerator_selector::operator()(const device &dev) const { - int Score = -1; + int Score = REJECT_DEVICE_SCORE; if (dev.is_accelerator()) { Score = 1000; // Give preference to device of SYCL BE. @@ -147,7 +147,7 @@ int accelerator_selector::operator()(const device &dev) const { } int host_selector::operator()(const device &dev) const { - int Score = -1; + int Score = REJECT_DEVICE_SCORE; if (dev.is_host()) { Score = 1000; // Give preference to device of SYCL BE. From ec971f97ec8cdcdcd9d7404dab73a880bc3ac4d8 Mon Sep 17 00:00:00 2001 From: Ruyman Reyes Date: Mon, 18 May 2020 14:29:45 +0000 Subject: [PATCH 04/10] [SYCL] Added missing const Signed-off-by: Ruyman Reyes --- sycl/source/detail/program_manager/program_manager.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sycl/source/detail/program_manager/program_manager.cpp b/sycl/source/detail/program_manager/program_manager.cpp index be3a63c5abb34..9b9a2181c0fc3 100644 --- a/sycl/source/detail/program_manager/program_manager.cpp +++ b/sycl/source/detail/program_manager/program_manager.cpp @@ -239,7 +239,8 @@ RetT *getOrBuild(KernelProgramCache &KPCache, KeyT &&CacheKey, static bool isDeviceBinaryTypeSupported(const context &C, RT::PiDeviceBinaryType Format) { - backend ContextBackend = detail::getSyclObjImpl(C)->getPlugin().getBackend(); + const backend ContextBackend = + detail::getSyclObjImpl(C)->getPlugin().getBackend(); // The CUDA backend cannot use SPIRV if (ContextBackend == backend::cuda && Format == PI_DEVICE_BINARY_TYPE_SPIRV) From 8fd3208864c027150d0866c3ff9bf0bef6a913cb Mon Sep 17 00:00:00 2001 From: Ruyman Reyes Date: Mon, 18 May 2020 19:44:58 +0000 Subject: [PATCH 05/10] [SYCL] Removed spurious initialization Signed-off-by: Ruyman Reyes --- sycl/source/device_selector.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/sycl/source/device_selector.cpp b/sycl/source/device_selector.cpp index 11f1e574831db..a965884d3116c 100644 --- a/sycl/source/device_selector.cpp +++ b/sycl/source/device_selector.cpp @@ -35,9 +35,7 @@ device device_selector::select_device() const { const device *res = nullptr; for (const auto &dev : devices) { - int dev_score = REJECT_DEVICE_SCORE; - - dev_score = (*this)(dev); + int dev_score = (*this)(dev); if (detail::pi::trace(detail::pi::TraceLevel::PI_TRACE_ALL)) { string_class PlatformVersion = dev.get_info() From 6697fffaf80205b4d9c51fcb8a2b52acf046f24d Mon Sep 17 00:00:00 2001 From: Ruyman Reyes Date: Tue, 19 May 2020 09:23:29 +0000 Subject: [PATCH 06/10] [SYCL] Score is negative for rejection Signed-off-by: Ruyman Reyes --- sycl/source/device_selector.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sycl/source/device_selector.cpp b/sycl/source/device_selector.cpp index a965884d3116c..52bdc38445b1a 100644 --- a/sycl/source/device_selector.cpp +++ b/sycl/source/device_selector.cpp @@ -30,7 +30,7 @@ static bool isDeviceOfPreferredSyclBe(const device &Device) { device device_selector::select_device() const { vector_class devices = device::get_devices(); - // SYCL specification uses -1 to reject a device from selection + // SYCL 1.2.1 defines a negative score to reject a device from selection int score = REJECT_DEVICE_SCORE; const device *res = nullptr; From bcd9a4125a1837783f12bd884189cba83c19c898 Mon Sep 17 00:00:00 2001 From: Ruyman Reyes Date: Tue, 19 May 2020 10:36:45 +0000 Subject: [PATCH 07/10] [SYCL] Addressing feedback from reviewers Signed-off-by: Ruyman Reyes --- sycl/source/detail/platform_impl.cpp | 15 ++++++++++++++- .../detail/program_manager/program_manager.cpp | 3 ++- 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/sycl/source/detail/platform_impl.cpp b/sycl/source/detail/platform_impl.cpp index 7b8a8013faa32..6d10960664656 100644 --- a/sycl/source/detail/platform_impl.cpp +++ b/sycl/source/detail/platform_impl.cpp @@ -21,6 +21,13 @@ namespace sycl { namespace detail { static bool IsBannedPlatform(platform Platform) { + // The NVIDIA OpenCL platform is currently not compatible with DPC++ + // since it is only 1.2 but gets selected by default in many systems + // There is also no support on the PTX backend for OpenCL consumption, + // and there have been some internal reports. + // To avoid problems on default users and deployment of DPC++ on platforms + // where CUDA is available, the OpenCL support is disabled. + // auto IsNVIDIAOpenCL = [](platform Platform) { if (Platform.is_host()) return false; @@ -29,7 +36,13 @@ static bool IsBannedPlatform(platform Platform) { "NVIDIA CUDA") != std::string::npos; const auto Backend = detail::getSyclObjImpl(Platform)->getPlugin().getBackend(); - return (HasCUDA && Backend == backend::opencl); + const bool IsCUDAOCL = (HasCUDA && Backend == backend::opencl); + if (detail::pi::trace(detail::pi::TraceLevel::PI_TRACE_ALL) && IsCUDAOCL) { + std::cout << "SYCL_PI_TRACE[all]: " + << "NVIDIA CUDA OpenCL platform found but is not compatible." + << std::endl; + } + return IsCUDAOCL; }; return IsNVIDIAOpenCL(Platform); } diff --git a/sycl/source/detail/program_manager/program_manager.cpp b/sycl/source/detail/program_manager/program_manager.cpp index 9b9a2181c0fc3..306a5c396e47c 100644 --- a/sycl/source/detail/program_manager/program_manager.cpp +++ b/sycl/source/detail/program_manager/program_manager.cpp @@ -88,7 +88,8 @@ static RT::PiProgram createBinaryProgram(const ContextImplPtr Context, // TODO: Implement `piProgramCreateWithBinary` to not require extra logic for // the CUDA backend. - if (Context->getPlugin().getBackend() == backend::cuda) { + const auto Backend = Context->getPlugin().getBackend(); + if (Backend == backend::cuda) { // TODO: Reemplace CreateWithSource with CreateWithBinary in CUDA backend const char *SignedData = reinterpret_cast(Data); Plugin.call(Context->getHandleRef(), 1 /*one binary*/, &SignedData, From 5c92d5f6577e9054224f8522a5170fb6229f1445 Mon Sep 17 00:00:00 2001 From: Ruyman Date: Fri, 22 May 2020 17:40:27 +0100 Subject: [PATCH 08/10] Apply suggestions from code review Co-authored-by: Alexey Bader --- sycl/include/CL/sycl/device_selector.hpp | 2 +- sycl/source/detail/program_manager/program_manager.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/sycl/include/CL/sycl/device_selector.hpp b/sycl/include/CL/sycl/device_selector.hpp index a1fb5955b59ed..39ed659d35795 100644 --- a/sycl/include/CL/sycl/device_selector.hpp +++ b/sycl/include/CL/sycl/device_selector.hpp @@ -20,7 +20,7 @@ class device; class __SYCL_EXPORT device_selector { protected: - static const int REJECT_DEVICE_SCORE = -1; + static constexpr int REJECT_DEVICE_SCORE = -1; public: virtual ~device_selector() = default; diff --git a/sycl/source/detail/program_manager/program_manager.cpp b/sycl/source/detail/program_manager/program_manager.cpp index 306a5c396e47c..85a1014c690be 100644 --- a/sycl/source/detail/program_manager/program_manager.cpp +++ b/sycl/source/detail/program_manager/program_manager.cpp @@ -324,7 +324,7 @@ RT::PiProgram ProgramManager::createPIProgram(const RTDeviceBinaryImage &Img, if (!isDeviceBinaryTypeSupported(Context, Format)) throw feature_not_supported( - "SPIR-V Online compilation is not supported in this context", + "SPIR-V online compilation is not supported in this context", PI_INVALID_OPERATION); // Load the image From 1a56184528a93cdf0f6b31f9d868b3fdb217819b Mon Sep 17 00:00:00 2001 From: Ruyman Reyes Date: Fri, 22 May 2020 16:44:31 +0000 Subject: [PATCH 09/10] [SYCL][CUDA] Moving comment to relevant part of the code Signed-off-by: Ruyman Reyes --- sycl/include/CL/sycl/device_selector.hpp | 1 + 1 file changed, 1 insertion(+) diff --git a/sycl/include/CL/sycl/device_selector.hpp b/sycl/include/CL/sycl/device_selector.hpp index 39ed659d35795..a50bf027e5734 100644 --- a/sycl/include/CL/sycl/device_selector.hpp +++ b/sycl/include/CL/sycl/device_selector.hpp @@ -20,6 +20,7 @@ class device; class __SYCL_EXPORT device_selector { protected: + // SYCL 1.2.1 defines a negative score to reject a device from selection static constexpr int REJECT_DEVICE_SCORE = -1; public: From 76b279be1a384c237e69b4797b6d5c2ed142ed73 Mon Sep 17 00:00:00 2001 From: Ruyman Reyes Date: Fri, 22 May 2020 16:49:11 +0000 Subject: [PATCH 10/10] Removed comment from device selector --- sycl/source/device_selector.cpp | 1 - 1 file changed, 1 deletion(-) diff --git a/sycl/source/device_selector.cpp b/sycl/source/device_selector.cpp index 52bdc38445b1a..08c369c8de8c4 100644 --- a/sycl/source/device_selector.cpp +++ b/sycl/source/device_selector.cpp @@ -30,7 +30,6 @@ static bool isDeviceOfPreferredSyclBe(const device &Device) { device device_selector::select_device() const { vector_class devices = device::get_devices(); - // SYCL 1.2.1 defines a negative score to reject a device from selection int score = REJECT_DEVICE_SCORE; const device *res = nullptr;