Skip to content

Commit 68214a7

Browse files
[SYCL] fix comparator to be strictly less-than. (#8259)
the comparator to sort should be strictly less than, rather than lazy boolean check. On Windows, a debug build may insert a check to make sure that comparator(a,b) != comparator(b,a) and this check results in an assert when tested on the current boolean check
1 parent eb31c2d commit 68214a7

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

sycl/source/detail/platform_impl.cpp

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -180,10 +180,7 @@ static std::vector<int> filterDeviceFilter(std::vector<RT::PiDevice> &PiDevices,
180180
// not add it to the list of available devices.
181181
std::sort(FilterList->get().begin(), FilterList->get().end(),
182182
[](const ods_target &filter1, const ods_target &filter2) {
183-
std::ignore = filter1;
184-
if (filter2.IsNegativeTarget)
185-
return false;
186-
return true;
183+
return filter1.IsNegativeTarget && !filter2.IsNegativeTarget;
187184
});
188185
}
189186

0 commit comments

Comments
 (0)