Skip to content

[SYCL][E2E] Switch Reduction/* tests to use <sycl/detail/core.hpp> #13126

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 25, 2024
Merged
Show file tree
Hide file tree
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
4 changes: 3 additions & 1 deletion sycl/test-e2e/Reduction/reduction_complex_nums.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@
#include <complex>
#include <numeric>

#include <sycl/sycl.hpp>
#include <sycl/detail/core.hpp>

#include <sycl/reduction.hpp>

using namespace sycl;

Expand Down
2 changes: 1 addition & 1 deletion sycl/test-e2e/Reduction/reduction_ctor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
// Note: This test relies on non-standard implementation details.

#include "reduction_utils.hpp"

#include <cassert>
#include <sycl/sycl.hpp>

using namespace sycl;

Expand Down
5 changes: 4 additions & 1 deletion sycl/test-e2e/Reduction/reduction_internal.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
// RUN: %{build} -o %t.out
// RUN: %{run} %t.out

#include <sycl/sycl.hpp>
#include <sycl/detail/core.hpp>

#include <sycl/reduction.hpp>

using namespace sycl;

template <int Dims> auto get_global_range(range<Dims> Range) { return Range; }
Expand Down
5 changes: 4 additions & 1 deletion sycl/test-e2e/Reduction/reduction_range_item.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,10 @@

// Windows doesn't yet have full shutdown().
// UNSUPPORTED: ze_debug && windows
#include <sycl/sycl.hpp>

#include <sycl/detail/core.hpp>

#include <sycl/reduction.hpp>

using namespace sycl;

Expand Down
5 changes: 4 additions & 1 deletion sycl/test-e2e/Reduction/reduction_span.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,10 @@
// UNSUPPORTED: ze_debug && windows
// This test performs basic checks of reductions initialized with a sycl::span

#include <sycl/sycl.hpp>
#include <sycl/detail/core.hpp>

#include <sycl/reduction.hpp>

using namespace sycl;

int NumErrors = 0;
Expand Down
5 changes: 4 additions & 1 deletion sycl/test-e2e/Reduction/reduction_span_pack.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,10 @@
// This test performs basic checks of reductions initialized with a pack
// containing at least one sycl::span

#include <sycl/sycl.hpp>
#include <sycl/detail/core.hpp>

#include <sycl/reduction.hpp>

using namespace sycl;

int NumErrors = 0;
Expand Down
5 changes: 4 additions & 1 deletion sycl/test-e2e/Reduction/reduction_utils.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,10 @@
#include <iostream>
#include <optional>

#include <sycl/sycl.hpp>
#include <sycl/detail/core.hpp>

#include <sycl/ext/oneapi/functional.hpp>
#include <sycl/reduction.hpp>

using namespace sycl;

Expand Down
8 changes: 4 additions & 4 deletions sycl/test-e2e/Reduction/regression_after_pr_6343.cpp
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
// RUN: %{build} -o %t.out
// RUN: %{run} %t.out

#include <sycl/sycl.hpp>
#include <sycl/detail/core.hpp>

#include <sycl/reduction.hpp>

using namespace sycl;

int main() {
device d(default_selector_v);
context ctx{d};
queue q{ctx, d};
queue q;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

has this been tested? I've seen this device..context..queue pattern before and it is used because on PVC with the new FLAT mode, the default selector will select all the L0 GPUs on the platform, which is two. So the queue gets created with a context that has two devices. Then, this sometimes leads to problems. The code you are replacing guarantees a context of one device.

I believe some of those problems have since been addressed, but not all. So we need to make sure this test change works on PVC.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, I've been developing the patch on PVC. Also, whenever this craziness is done on purpose, it better be properly commented.


int WGSize = 256;
// Reduction implementation would spawn several other kernels to reduce
Expand Down