Skip to content
This repository was archived by the owner on Mar 28, 2023. It is now read-only.

Commit 052691b

Browse files
committed
fix host availability
Signed-off-by: Byoungro So <[email protected]>
1 parent 03cb865 commit 052691b

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

SYCL/Regression/device_num.cpp

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -82,14 +82,12 @@ int main() {
8282
printDeviceType(d);
8383
assert(targetDevice == d &&
8484
"The selected device is not the target device specified.");
85-
}
86-
// HOST device is always available regardless of SYCL_DEVICE_FILTER
87-
{
85+
} else if (targetDevice.is_host()) {
8886
host_selector hs;
8987
device d = hs.select_device();
9088
std::cout << "host_selector selected ";
9189
printDeviceType(d);
92-
assert(d.is_host() && "The selected device is not a host device.");
90+
assert(targetDevice == d && "The selected device is not a host device.");
9391
}
9492
}
9593
return 0;

0 commit comments

Comments
 (0)