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

[CUDA] Switched on reduce test for CUDA backend #782

Open
wants to merge 6 commits into
base: intel
Choose a base branch
from
Open
Changes from all commits
Commits
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
14 changes: 13 additions & 1 deletion SYCL/GroupAlgorithm/reduce_sycl2020.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// UNSUPPORTED: cuda || hip
// UNSUPPORTED: hip
// RUN: %clangxx -fsycl -fsycl-targets=%sycl_triple -fsycl-device-code-split=per_kernel %s -I . -o %t.out
// RUN: %CPU_RUN_PLACEHOLDER %t.out
// RUN: %GPU_RUN_PLACEHOLDER %t.out
Expand Down Expand Up @@ -88,6 +88,18 @@ int main() {
test<class KernelNameBitOrI>(q, input, output, sycl::bit_or<int>(), 0);
test<class KernelNameBitXorI>(q, input, output, sycl::bit_xor<int>(), 0);
test<class KernelNameBitAndI>(q, input, output, sycl::bit_and<int>(), ~0);

std::array<unsigned int, N> inputUI;
std::array<unsigned int, 4> outputUI;
std::iota(inputUI.begin(), inputUI.end(), 0);
std::fill(outputUI.begin(), outputUI.end(), 0);

test<class KernelNameBitOrUI>(q, inputUI, outputUI,
sycl::bit_or<unsigned int>(), 0);
test<class KernelNameBitXorUI>(q, inputUI, outputUI,
sycl::bit_xor<unsigned int>(), 0);
test<class KernelNameBitAndUI>(q, inputUI, outputUI,
sycl::bit_and<unsigned int>(), ~0);
#endif // SPIRV_1_3

// as part of SYCL_EXT_ONEAPI_COMPLEX_ALGORITHMS (
Expand Down