Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
118830c
[SYCL] fix asserts after logical operation changes
dklochkov-emb May 12, 2025
3f34653
[SYCL] use alias for readability
dklochkov-emb May 13, 2025
102248e
Merge remote-tracking branch 'upstream/sycl' into sycl-fix-group-algo…
dklochkov-emb May 13, 2025
cad3fa2
Merge remote-tracking branch 'upstream/sycl' into sycl-fix-group-algo…
dklochkov-emb May 20, 2025
876f979
Merge remote-tracking branch 'upstream/sycl' into sycl-fix-group-algo…
dklochkov-emb May 21, 2025
f3b026a
[SYCL] use output type to check in assert
dklochkov-emb May 22, 2025
76e20b6
Revert "[SYCL] use output type to check in assert"
dklochkov-emb Oct 13, 2025
e0d9acd
Revert "[SYCL] use alias for readability"
dklochkov-emb Oct 13, 2025
66ecb82
Revert "[SYCL] fix asserts after logical operation changes"
dklochkov-emb Oct 13, 2025
f6a85e1
Merge remote-tracking branch 'upstream/sycl' into sycl-fix-group-algo…
dklochkov-emb Oct 13, 2025
aaaf763
[SYCL] do not use logical_or and logical_and in group algorithm e2e t…
dklochkov-emb Oct 13, 2025
20c6e47
[SYCL] implement tests to check static assert of group algorithms
dklochkov-emb Oct 16, 2025
eabe3b7
[SYCL] fix formatting in tests
dklochkov-emb Oct 16, 2025
fc07225
[SYCL] move static assert checks from tests-e2e folder to test
dklochkov-emb Oct 20, 2025
5630f11
Merge remote-tracking branch 'upstream/sycl' into sycl-fix-group-algo…
dklochkov-emb Oct 20, 2025
f482d51
[SYCL] do not cgeck all expected errors in one line
dklochkov-emb Oct 29, 2025
5c412c8
Merge remote-tracking branch 'upstream/sycl' into sycl-fix-group-algo…
dklochkov-emb Oct 29, 2025
94700d4
[SYCL] fix formatting
dklochkov-emb Oct 29, 2025
f832545
[SYCL] rework negative tests of group algorithms
dklochkov-emb Oct 30, 2025
3198498
Merge remote-tracking branch 'upstream/sycl' into sycl-fix-group-algo…
dklochkov-emb Oct 30, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 0 additions & 8 deletions sycl/test-e2e/GroupAlgorithm/exclusive_scan_sycl2020.cpp
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
// RUN: %{build} -Wno-error=deprecated-declarations -fsycl-device-code-split=per_kernel -I . -o %t.out
// RUN: %{run} %t.out

// XFAIL: preview-mode
// XFAIL-TRACKER: https://github.com/intel/llvm/issues/18390

#include "../helpers.hpp"
#include "support.h"
#include <algorithm>
Expand Down Expand Up @@ -173,14 +170,9 @@ int main() {
test<class KernelNameBitXorI>(input, sycl::bit_xor<int>(), 0);
test<class KernelNameBitAndI>(input_small, sycl::bit_and<int>(), ~0);

test<class LogicalOrInt>(input, sycl::logical_or<int>(), 0);
test<class LogicalAndInt>(input, sycl::logical_and<int>(), 1);

std::array<bool, N> bool_input = {};
test<class LogicalOrBool>(bool_input, sycl::logical_or<bool>(), false);
test<class LogicalOrVoid>(bool_input, sycl::logical_or<>(), false);
test<class LogicalAndBool>(bool_input, sycl::logical_and<bool>(), true);
test<class LogicalAndVoid>(bool_input, sycl::logical_and<>(), true);

std::array<int2, N> int2_input = {};
std::iota(int2_input.begin(), int2_input.end(), 0);
Expand Down
14 changes: 0 additions & 14 deletions sycl/test-e2e/GroupAlgorithm/inclusive_scan_sycl2020.cpp
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
// RUN: %{build} -Wno-error=deprecated-declarations -fsycl-device-code-split=per_kernel -I . -o %t.out
// RUN: %{run} %t.out

// XFAIL: preview-mode
// XFAIL-TRACKER: https://github.com/intel/llvm/issues/18390

#include "../helpers.hpp"
#include "support.h"
#include <algorithm>
Expand Down Expand Up @@ -169,21 +166,10 @@ int main() {
test<class KernelNameMultipliesI>(input_small, sycl::multiplies<int>(), 1);
test<class KernelNameBitOrI>(input, sycl::bit_or<int>(), 0);
test<class KernelNameBitXorI>(input, sycl::bit_xor<int>(), 0);
test<class KernelNameBitAndI>(input_small, sycl::bit_and<int>(), ~0);

test<class LogicalOrInt>(input, sycl::logical_or<int>(), 0);
test<class LogicalAndInt>(input, sycl::logical_and<int>(), 1);

std::array<bool, N> bool_input = {};
test<class LogicalOrBool>(bool_input, sycl::logical_or<bool>(), false);
test<class LogicalOrVoid>(bool_input, sycl::logical_or<>(), false);
test<class LogicalAndBool>(bool_input, sycl::logical_and<bool>(), true);
test<class LogicalAndVoid>(bool_input, sycl::logical_and<>(), true);

test<class LogicalOrBool>(bool_input, sycl::logical_or<bool>(), false);
test<class LogicalOrVoid>(bool_input, sycl::logical_or<>(), false);
test<class LogicalAndBool>(bool_input, sycl::logical_and<bool>(), true);
test<class LogicalAndVoid>(bool_input, sycl::logical_and<>(), true);

std::array<int2, N> int2_input = {};
std::iota(int2_input.begin(), int2_input.end(), 0);
Expand Down
8 changes: 0 additions & 8 deletions sycl/test-e2e/GroupAlgorithm/reduce_sycl2020.cpp
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
// RUN: %{build} -fsycl-device-code-split=per_kernel -I . -o %t.out
// RUN: %{run} %t.out

// XFAIL: preview-mode
// XFAIL-TRACKER: https://github.com/intel/llvm/issues/18390

#include "support.h"

#include <sycl/sub_group.hpp>
Expand Down Expand Up @@ -100,14 +97,9 @@ int main() {
test<class KernelNameBitXorI>(input, sycl::bit_xor<int>(), 0);
test<class KernelNameBitAndI>(input, sycl::bit_and<int>(), ~0);

test<class LogicalOrInt>(input, sycl::logical_or<int>(), 0);
test<class LogicalAndInt>(input, sycl::logical_and<int>(), 1);

std::array<bool, N> bool_input = {};
test<class LogicalOrBool>(bool_input, sycl::logical_or<bool>(), false);
test<class LogicalOrVoid>(bool_input, sycl::logical_or<>(), false);
test<class LogicalAndBool>(bool_input, sycl::logical_and<bool>(), true);
test<class LogicalAndVoid>(bool_input, sycl::logical_and<>(), true);

std::array<int2, N> int2_input = {};
std::iota(int2_input.begin(), int2_input.end(), 0);
Expand Down
77 changes: 77 additions & 0 deletions sycl/test/group_algorithms/logical_or_and_group_algorithms.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
// RUN: %clangxx -fsycl -Xclang -verify=expected -Xclang -verify-ignore-unexpected=note -fpreview-breaking-changes -fsyntax-only -fsycl-device-only -ferror-limit=0 %s

#include <sycl/group_algorithm.hpp>

using namespace sycl;

constexpr size_t N = 8;
range<2> global{16, 32};
range<2> local{4, 8};
id<2> groupId{1, 2};
group<2> g = detail::Builder::createGroup(global, local, groupId);
int *rawIn = nullptr;
int *rawOut = nullptr;

void ExclusiveScanOverGroup() {
// expected-error@sycl/group_algorithm.hpp:* {{Result type of binary_op must match scan accumulation type}}
exclusive_scan_over_group(g, 0, sycl::logical_and<int>{});
// expected-error@sycl/group_algorithm.hpp:* {{Result type of binary_op must match scan accumulation type}}
exclusive_scan_over_group(g, 0, 0, sycl::logical_and<int>{});
// expected-error@sycl/group_algorithm.hpp:* {{Result type of binary_op must match scan accumulation type}}
exclusive_scan_over_group(g, 0, sycl::logical_or<int>{});
// expected-error@sycl/group_algorithm.hpp:* {{Result type of binary_op must match scan accumulation type}}
exclusive_scan_over_group(g, 0, 0, sycl::logical_or<int>{});
}

void JointExclusiveScan() {
// expected-error@sycl/group_algorithm.hpp:* {{Result type of binary_op must match scan accumulation type}}
joint_exclusive_scan(g, rawIn, rawIn + N, rawOut, sycl::logical_and<int>{});
// expected-error@sycl/group_algorithm.hpp:* {{Result type of binary_op must match scan accumulation type}}
joint_exclusive_scan(g, rawIn, rawIn + N, rawOut, sycl::logical_or<int>{});
// expected-error@sycl/group_algorithm.hpp:* {{Result type of binary_op must match scan accumulation type}}
joint_exclusive_scan(g, rawIn, rawIn + N, rawOut, 0,
sycl::logical_and<int>{});
// expected-error@sycl/group_algorithm.hpp:* {{Result type of binary_op must match scan accumulation type}}
joint_exclusive_scan(g, rawIn, rawIn + N, rawOut, 0, sycl::logical_or<int>{});
}

void InclusiveScanOverGroup() {
// expected-error@sycl/group_algorithm.hpp:* {{Result type of binary_op must match scan accumulation type}}
inclusive_scan_over_group(g, 0, sycl::logical_and<int>{});
// expected-error@sycl/group_algorithm.hpp:* {{Result type of binary_op must match scan accumulation type}}
inclusive_scan_over_group(g, 0, sycl::logical_and<int>{}, 0);
// expected-error@sycl/group_algorithm.hpp:* {{Result type of binary_op must match scan accumulation type}}
inclusive_scan_over_group(g, 0, sycl::logical_or<int>{});
// expected-error@sycl/group_algorithm.hpp:* {{Result type of binary_op must match scan accumulation type}}
inclusive_scan_over_group(g, 0, sycl::logical_or<int>{}, 0);
}

void JointInclusiveScan() {
// expected-error@sycl/group_algorithm.hpp:* {{Result type of binary_op must match scan accumulation type}}
joint_inclusive_scan(g, rawIn, rawIn + N, rawOut, sycl::logical_and<int>{});
// expected-error@sycl/group_algorithm.hpp:* {{Result type of binary_op must match scan accumulation type}}
joint_inclusive_scan(g, rawIn, rawIn + N, rawOut, sycl::logical_or<int>{});
// expected-error@sycl/group_algorithm.hpp:* {{Result type of binary_op must match scan accumulation type}}
joint_inclusive_scan(g, rawIn, rawIn + N, rawOut, sycl::logical_and<int>{},
0);
// expected-error@sycl/group_algorithm.hpp:* {{Result type of binary_op must match scan accumulation type}}
joint_inclusive_scan(g, rawIn, rawIn + N, rawOut, sycl::logical_or<int>{}, 0);
}

void ReduceOverGroup() {
// expected-error@sycl/group_algorithm.hpp:* {{Result type of binary_op must match reduction accumulation type}}
reduce_over_group(g, 0, sycl::logical_and<int>{});
// expected-error@sycl/group_algorithm.hpp:* {{Result type of binary_op must match reduction accumulation type}}
reduce_over_group(g, 0, 0, sycl::logical_and<int>{});
// expected-error@sycl/group_algorithm.hpp:* {{Result type of binary_op must match reduction accumulation type}}
reduce_over_group(g, 0, sycl::logical_or<int>{});
// expected-error@sycl/group_algorithm.hpp:* {{Result type of binary_op must match reduction accumulation type}}
reduce_over_group(g, 0, 0, sycl::logical_or<int>{});
}

void JointReduce() {
// expected-error@sycl/group_algorithm.hpp:* {{Result type of binary_op must match reduction accumulation type}}
joint_reduce(g, rawIn, rawIn + N, 0, sycl::logical_and<int>{});
// expected-error@sycl/group_algorithm.hpp:* {{Result type of binary_op must match reduction accumulation type}}
joint_reduce(g, rawIn, rawIn + N, 0, sycl::logical_or<int>{});
}
Loading