Skip to content

Commit ab9f4be

Browse files
author
Alexander Johnston
committed
[SYCL][CUDA] Further fixes to CUDA device selection
Fix platform string comparison for CUDA platform detection. Fix device info platform query so that it uses the device's plugin, rather than the GlobalPlugin. Signed-off-by: Alexander Johnston <[email protected]>
1 parent fb4521e commit ab9f4be

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

sycl/source/detail/device_info.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ template <info::device param> struct get_device_info<platform, param> {
6868
// Use the Plugin from the device_impl class after plugin details
6969
// are added to the class.
7070
return createSyclObjFromImpl<platform>(
71-
std::make_shared<platform_impl>(result, RT::GlobalPlugin));
71+
std::make_shared<platform_impl>(result, Plugin));
7272
}
7373
};
7474

sycl/source/detail/platform_impl.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ class platform_impl {
7373
bool is_host() const { return MHostPlatform; };
7474

7575
bool is_cuda() const {
76-
const string_class CUDA_PLATFORM_STRING = "NVIDIA_CUDA";
76+
const string_class CUDA_PLATFORM_STRING = "NVIDIA CUDA";
7777
const string_class PlatformName = get_platform_info<string_class,
7878
info::platform::name>::get(MPlatform, getPlugin());
7979
return PlatformName == CUDA_PLATFORM_STRING;

0 commit comments

Comments
 (0)