Skip to content

[SYCL][E2E] Use fine-grained includes in miscellaneous tests #13853

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 21, 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
2 changes: 1 addition & 1 deletion sycl/test-e2e/AbiNeutral/catch-exception.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
// This test case tests if compiling works with or without
// _GLIBCXX_USE_CXX11_ABI=0.

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

int main() {
#ifdef _GLIBCXX_USE_CXX11_ABI
Expand Down
2 changes: 1 addition & 1 deletion sycl/test-e2e/AbiNeutral/device-info.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
#include <deque>
#include <iostream>
#include <mutex>
#include <sycl/sycl.hpp>
#include <sycl/detail/core.hpp>
#include <vector>

template <typename T> using dpcpp_info_t = typename T::return_type;
Expand Down
3 changes: 2 additions & 1 deletion sycl/test-e2e/AbiNeutral/submit-kernel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@
// _GLIBCXX_USE_CXX11_ABI=0.

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

int main() {
try {
Expand Down
4 changes: 3 additions & 1 deletion sycl/test-e2e/Annotated_arg_ptr/annotated_arg.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@
// RUN: %{run} %t.out
// REQUIRES: aspect-usm_shared_allocations

#include <sycl/sycl.hpp>
#include <sycl/detail/core.hpp>
#include <sycl/ext/oneapi/experimental/annotated_arg/annotated_arg.hpp>
#include <sycl/usm.hpp>

using namespace sycl;
using namespace sycl::ext::oneapi::experimental;
Expand Down
4 changes: 3 additions & 1 deletion sycl/test-e2e/Annotated_arg_ptr/annotated_ptr.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,10 @@
// RUN: %{run} %t.out
// REQUIRES: aspect-usm_shared_allocations

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

#include <sycl/ext/oneapi/experimental/annotated_ptr/annotated_ptr.hpp>
#include <sycl/ext/oneapi/experimental/annotated_usm/dealloc.hpp>
using namespace sycl;
using namespace sycl::ext::oneapi::experimental;
using namespace sycl::ext::intel::experimental;
Expand Down
8 changes: 4 additions & 4 deletions sycl/test-e2e/Annotated_usm/annotated_usm_align.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@
// This e2e test checks the alignment of the annotated USM allocation (host &
// device) in various cases

#include <sycl/sycl.hpp>
#include <sycl/detail/core.hpp>
#include <sycl/ext/oneapi/experimental/annotated_usm/alloc_device.hpp>
#include <sycl/ext/oneapi/experimental/annotated_usm/alloc_host.hpp>

#include <complex>
#include <numeric>

// clang-format on

using namespace sycl::ext::oneapi::experimental;
using namespace sycl::ext::intel::experimental;
using alloc = sycl::usm::alloc;
Expand Down Expand Up @@ -424,4 +424,4 @@ int main() {
testAlign<std::complex<double>>(q, 4);
testAlign<MyStruct>(q, 4);
return 0;
}
}
8 changes: 5 additions & 3 deletions sycl/test-e2e/Annotated_usm/annotated_usm_kind.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,15 @@
// This e2e test checks the usm kind of the pointer returned by annotated USM
// allocation

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

#include <sycl/ext/oneapi/experimental/annotated_usm/alloc_device.hpp>
#include <sycl/ext/oneapi/experimental/annotated_usm/alloc_host.hpp>
#include <sycl/ext/oneapi/experimental/annotated_usm/alloc_shared.hpp>

#include <complex>
#include <numeric>

// clang-format on

using namespace sycl::ext::oneapi::experimental;
using namespace sycl::ext::intel::experimental;
using alloc = sycl::usm::alloc;
Expand Down
6 changes: 3 additions & 3 deletions sycl/test-e2e/Annotated_usm/annotated_usm_negative.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@
// not have the corresponding aspect, while the gpu runtime has different
// behavior

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

#include <sycl/ext/oneapi/experimental/annotated_usm/alloc_shared.hpp>

#include <complex>
#include <iostream>

// clang-format on

using namespace sycl::ext::oneapi::experimental;
using namespace sycl::ext::intel::experimental;

Expand Down
6 changes: 4 additions & 2 deletions sycl/test-e2e/Annotated_usm/annotated_usm_shared_align.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,9 @@
// This e2e test checks the alignment of the annotated shared USM allocation in
// various cases

#include <sycl/sycl.hpp>
#include <sycl/detail/core.hpp>
#include <sycl/ext/oneapi/experimental/annotated_usm/alloc_shared.hpp>
#include <sycl/usm.hpp>

#include <complex>
#include <numeric>
Expand Down Expand Up @@ -251,4 +253,4 @@ int main() {
testAlign<int>(q, 128);
testAlign<std::complex<double>>(q, 4);
return 0;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
// RUN: %{run} %t.out

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

using namespace sycl;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
// RUN: %{run} %t.out

#include <level_zero/ze_api.h>
#include <sycl/sycl.hpp>
#include <sycl/backend.hpp>
#include <sycl/detail/core.hpp>

using namespace sycl;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@
// RUN: %{run} %t.out

#include <CL/cl.h>
#include <sycl/sycl.hpp>
#include <sycl/backend.hpp>
#include <sycl/detail/core.hpp>

using namespace sycl;

Expand Down
1 change: 1 addition & 0 deletions sycl/test-e2e/Basic/image/image.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
//
//===----------------------------------------------------------------------===//

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

#include <iostream>
Expand Down
1 change: 1 addition & 0 deletions sycl/test-e2e/Basic/image/image_array.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
//
//===----------------------------------------------------------------------===//

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

#include <iostream>
Expand Down
2 changes: 1 addition & 1 deletion sycl/test-e2e/Complex/sycl_complex_helper.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
#include <iomanip>

#define SYCL_EXT_ONEAPI_COMPLEX
#include <sycl/detail/core.hpp>
#include <sycl/ext/oneapi/experimental/complex/complex.hpp>
#include <sycl/sycl.hpp>

using namespace sycl::ext::oneapi;

Expand Down
3 changes: 2 additions & 1 deletion sycl/test-e2e/CompositeDevice/composite_device.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@
// RUN: env ZE_FLAT_DEVICE_HIERARCHY=FLAT %{run} %t.out
// UNSUPPORTED: (windows && level_zero)

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

#ifdef SYCL_EXT_ONEAPI_COMPOSITE_DEVICE

Expand Down
3 changes: 2 additions & 1 deletion sycl/test-e2e/CompositeDevice/device_selector_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@
// RUN: env ONEAPI_DEVICE_SELECTOR=level_zero:0 ZE_FLAT_DEVICE_HIERARCHY=COMBINED %t.out
// REQUIRES: level_zero

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

#ifdef SYCL_EXT_ONEAPI_COMPOSITE_DEVICE

Expand Down
3 changes: 2 additions & 1 deletion sycl/test-e2e/CompositeDevice/run_on_composite_device.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
// RUN: %{build} -o %t.out
// RUN: env ZE_FLAT_DEVICE_HIERARCHY=COMBINED %{run} %t.out

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

#ifdef SYCL_EXT_ONEAPI_COMPOSITE_DEVICE

Expand Down
2 changes: 1 addition & 1 deletion sycl/test-e2e/Config/allowlist.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
#include <exception>
#include <iostream>
#include <string>
#include <sycl/sycl.hpp>
#include <sycl/detail/core.hpp>

static void replaceSpecialCharacters(std::string &Str) {
// Replace common special symbols with '.' which matches to any character
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
//
//===----------------------------------------------------------------------===//

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

#include <cassert>
#include <iostream>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#include <iostream>
#include <memory>
#include <sycl/backend.hpp>
#include <sycl/backend/opencl.hpp>
#include <sycl/sycl.hpp>
#include <sycl/detail/core.hpp>
#include <unordered_map>
using namespace sycl;

Expand Down
2 changes: 1 addition & 1 deletion sycl/test-e2e/DeprecatedFeatures/kernel_interop.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//
#include <sycl/sycl.hpp>
#include <sycl/detail/core.hpp>

#include <cassert>

Expand Down
2 changes: 1 addition & 1 deletion sycl/test-e2e/DeprecatedFeatures/opencl_interop.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

#include <cassert>
#include <exception>
#include <sycl/sycl.hpp>
#include <sycl/detail/core.hpp>
#include <vector>

#define CL_CHECK_ERRORS(ERR) \
Expand Down
2 changes: 1 addition & 1 deletion sycl/test-e2e/DeprecatedFeatures/sampler_ocl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

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

namespace sycl {
using namespace sycl;
Expand Down
3 changes: 2 additions & 1 deletion sycl/test-e2e/DeprecatedFeatures/set_arg_interop.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
// RUN: %{build} -D__SYCL_INTERNAL_API -o %t.out %opencl_lib -O3
// RUN: %{run} %t.out

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

#include <cassert>

Expand Down
2 changes: 1 addition & 1 deletion sycl/test-e2e/DeprecatedFeatures/subbuffer_interop.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
//
//===----------------------------------------------------------------------===//

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

#include <cassert>
#include <iostream>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,9 @@
// RUN: %clangxx -fsycl -fsycl-targets=intel_gpu_pvc %s -o %t.out
// RUN: %{run} %t.out

#include <sycl/detail/core.hpp>
#include <sycl/ext/oneapi/experimental/device_architecture.hpp>
#include <sycl/sycl.hpp>
#include <sycl/usm.hpp>

using namespace sycl;
using namespace sycl::ext::oneapi::experimental;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
// RUN: %{build} -o %t.out
// RUN: %{run} %t.out

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

namespace syclex = sycl::ext::oneapi::experimental;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
// RUN: %clangxx -fsycl -fsycl-targets=spir64_x86_64 %s -o %t.out
// RUN: %{run} %t.out

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

using namespace sycl;
using namespace sycl::ext::oneapi::experimental;
Expand Down
2 changes: 1 addition & 1 deletion sycl/test-e2e/DeviceGlobal/common.hpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#pragma once

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

using namespace sycl;
using namespace sycl::ext::oneapi::experimental;
Expand Down
2 changes: 2 additions & 0 deletions sycl/test-e2e/DeviceGlobal/device_global_arrow.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

#include "common.hpp"

#include <sycl/usm.hpp>

struct StructWithMember {
int x;
int getX() { return x; }
Expand Down
3 changes: 2 additions & 1 deletion sycl/test-e2e/DeviceLib/ITTAnnotations/atomic.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
// RUN: %{build} -fsycl-instrument-device-code -o %t.out
// RUN: %{run} %t.out

#include "sycl/sycl.hpp"
#include "sycl/atomic_ref.hpp"
#include "sycl/detail/core.hpp"

using namespace sycl;

Expand Down
2 changes: 1 addition & 1 deletion sycl/test-e2e/DeviceLib/ITTAnnotations/barrier.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// RUN: %{build} -fsycl-instrument-device-code -o %t.out
// RUN: %{run} %t.out

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

using namespace sycl;
Expand Down
2 changes: 1 addition & 1 deletion sycl/test-e2e/DeviceLib/assert-windows.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
#include <array>
#include <assert.h>
#include <iostream>
#include <sycl/sycl.hpp>
#include <sycl/detail/core.hpp>

using namespace sycl;

Expand Down
2 changes: 1 addition & 1 deletion sycl/test-e2e/DeviceLib/assert.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@
#include <assert.h>
#include <iostream>
#include <stdlib.h>
#include <sycl/sycl.hpp>
#include <sycl/detail/core.hpp>
#include <sys/types.h>
#include <sys/wait.h>
#include <unistd.h>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#include <cassert>
#include <sycl/sycl.hpp>
#include <sycl/detail/core.hpp>
#include <sycl/ext/oneapi/experimental/builtins.hpp>

template <typename T, size_t N>
void assert_out_of_bound(sycl::marray<T, N> val, sycl::marray<T, N> lower,
Expand Down
3 changes: 2 additions & 1 deletion sycl/test-e2e/DeviceLib/built-ins/printf.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@
// RUN: %{build} -fsycl-device-code-split=per_kernel -D__SYCL_USE_VARIADIC_SPIRV_OCL_PRINTF__ -o %t_var.out
// RUN: %{run} %t_var.out | FileCheck %s

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

#include <cstdint>
#include <iostream>
Expand Down
Loading
Loading