Skip to content

Commit 103d706

Browse files
authored
[SYCL] Fix a typo in test regression/device_num.cpp (#3286)
The change is simple. ">=" ==> ">" The original code was written assuming the device_num starts at 1. As I changed the code to start device_num at 0, the condition of test should have been changed to NOT run when the test is going over the total number of devices found in the system. Signed-off-by: Byoungro So <byoungro.so@intel.com>
1 parent 5831c55 commit 103d706

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

sycl/test/regression/device_num.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ int main() {
4444
deviceNum = std::atoi(envVal);
4545

4646
auto devices = device::get_devices();
47-
if (devices.size() >= deviceNum) {
47+
if (devices.size() > deviceNum) {
4848
device targetDevice = devices[deviceNum];
4949
std::cout << "Target Device: ";
5050
printDeviceType(targetDevice);

0 commit comments

Comments
 (0)