Skip to content

Commit 6d7f2d3

Browse files
sergey-semenovbader
authored andcommitted
[SYCL] Fix platform selection with no OpenCL platforms available
Signed-off-by: Sergey Semenov <[email protected]>
1 parent 4646fc1 commit 6d7f2d3

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

sycl/source/detail/platform_impl.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,9 @@ platform_impl_pi::get_platforms() {
1818
vector_class<platform> platforms;
1919

2020
pi_uint32 num_platforms = 0;
21-
PI_CALL(RT::piPlatformsGet(0, 0, &num_platforms));
21+
// TODO this bypasses PI_CALL macro as a temporary fix for the case with 0
22+
// OpenCL platforms
23+
RT::piPlatformsGet(0, 0, &num_platforms);
2224
info::device_type forced_type = detail::get_forced_type();
2325

2426
if (num_platforms) {

0 commit comments

Comments
 (0)