Skip to content

[SYCL] Use sycl/detail/core.hpp in test-e2e/SubGroupMask/* #13842

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
May 20, 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
15 changes: 8 additions & 7 deletions sycl/include/sycl/ext/oneapi/sub_group_mask.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,14 @@
//===----------------------------------------------------------------------===//
#pragma once

#include <sycl/detail/helpers.hpp> // for Builder
#include <sycl/detail/memcpy.hpp> // detail::memcpy
#include <sycl/exception.hpp> // for errc, exception
#include <sycl/feature_test.hpp> // for SYCL_EXT_ONEAPI_SUB_GROUP_MASK
#include <sycl/id.hpp> // for id
#include <sycl/marray.hpp> // for marray
#include <sycl/types.hpp> // for vec
#include <sycl/builtins.hpp> // for assert
#include <sycl/detail/helpers.hpp> // for Builder
#include <sycl/detail/memcpy.hpp> // detail::memcpy
#include <sycl/exception.hpp> // for errc, exception
#include <sycl/feature_test.hpp> // for SYCL_EXT_ONEAPI_SUB_GROUP_MASK
#include <sycl/id.hpp> // for id
#include <sycl/marray.hpp> // for marray
#include <sycl/types.hpp> // for vec

#include <assert.h> // for assert
#include <climits> // for CHAR_BIT
Expand Down
4 changes: 3 additions & 1 deletion sycl/test-e2e/SubGroupMask/Basic.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,10 @@
//
//===----------------------------------------------------------------------===//

#include <sycl/detail/core.hpp>
#include <sycl/ext/oneapi/sub_group_mask.hpp>

#include <iostream>
#include <sycl/sycl.hpp>
using namespace sycl;
constexpr int global_size = 128;
constexpr int local_size = 32;
Expand Down
7 changes: 6 additions & 1 deletion sycl/test-e2e/SubGroupMask/GroupSize.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,13 @@
//
//===----------------------------------------------------------------------===//

// TODO: switch to <sycl/detail/core.hpp> once we decide how feature macros
Copy link
Contributor

@againull againull May 20, 2024

Choose a reason for hiding this comment

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

NIT: Do we need this TODO? It looks like test is using core.hpp now.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

You're right. I'll remove that in a follow-up PR because I want this merged to unblock dependent changes.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Changing it as part of #13853.

// should work in that scenario.
#include <sycl/detail/core.hpp>
#include <sycl/ext/oneapi/sub_group_mask.hpp>

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

using namespace sycl;
#ifdef SYCL_EXT_ONEAPI_SUB_GROUP_MASK
constexpr int global_size = 128;
Expand Down
3 changes: 2 additions & 1 deletion sycl/test-e2e/SubGroupMask/sub_group_mask_ver2.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@
// RUN: %{run} %t.out

#include <iostream>
#include <sycl/sycl.hpp>
#include <sycl/detail/core.hpp>
#include <sycl/ext/oneapi/sub_group_mask.hpp>

#define TEST_ON_DEVICE(TEST_BODY) \
{ \
Expand Down
13 changes: 13 additions & 0 deletions sycl/test/include_deps/sycl_detail_core.hpp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,19 @@
// CHECK-NEXT: detail/spirv.hpp
// CHECK-NEXT: ext/oneapi/experimental/non_uniform_groups.hpp
// CHECK-NEXT: ext/oneapi/sub_group_mask.hpp
// CHECK-NEXT: builtins.hpp
Copy link
Contributor Author

@aelovikov-intel aelovikov-intel May 20, 2024

Choose a reason for hiding this comment

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

Normally we would try to avoid growing this, but this change is a bugfix. The proper future change is to move the entire "sub_group_mask" extension out of core.hpp. I expect that to happen in #13760.

// CHECK-NEXT: detail/builtins/builtins.hpp
// CHECK-NEXT: builtins_utils_vec.hpp
// CHECK-NEXT: builtins_utils_scalar.hpp
// CHECK-NEXT: detail/boolean.hpp
// CHECK-NEXT: detail/builtins/common_functions.inc
// CHECK-NEXT: detail/builtins/helper_macros.hpp
// CHECK-NEXT: detail/builtins/geometric_functions.inc
// CHECK-NEXT: detail/builtins/half_precision_math_functions.inc
// CHECK-NEXT: detail/builtins/integer_functions.inc
// CHECK-NEXT: detail/builtins/math_functions.inc
// CHECK-NEXT: detail/builtins/native_math_functions.inc
// CHECK-NEXT: detail/builtins/relational_functions.inc
// CHECK-NEXT: feature_test.hpp
// CHECK-NEXT: functional.hpp
// CHECK-NEXT: device.hpp
Expand Down
Loading