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

Commit d8b7396

Browse files
authored
[SYCL] Add <iostream> headers to tests which assumed "CL/sycl.hpp" would have it included (#1084)
The purpose of this PR is support the changes made in PR intel/llvm#6469 , which gets rid of #include <iostream> from sycl headers and is assumed to be included in the "sycl/sycl.hpp" header for some of the tests present in this repository
1 parent 635fc6c commit d8b7396

File tree

129 files changed

+134
-31
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

129 files changed

+134
-31
lines changed

SYCL/AtomicRef/atomic_memory_order.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111

1212
#include "atomic_memory_order.h"
1313
#include <cassert>
14+
#include <iostream>
1415
using namespace sycl;
1516

1617
int main() {

SYCL/BFloat16/bfloat16_type.hpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
#include <iostream>
12
#include <sycl/ext/oneapi/experimental/bfloat16.hpp>
23
#include <sycl/sycl.hpp>
34

SYCL/Basic/access_to_subset.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
1212
//
1313
//===----------------------------------------------------------------------===//
14+
#include <iostream>
1415
#include <sycl/sycl.hpp>
1516

1617
using namespace sycl;

SYCL/Basic/accessor/accessor.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
//
1313
//===----------------------------------------------------------------------===//
1414
#include <cassert>
15+
#include <iostream>
1516
#include <sycl/sycl.hpp>
1617

1718
struct IdxID1 {

SYCL/Basic/barrier_order.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
// RUN: %CPU_RUN_PLACEHOLDER %t.out
55
// RUN: %GPU_RUN_PLACEHOLDER %t.out
66

7+
#include <iostream>
78
#include <stdlib.h>
89
#include <sycl/sycl.hpp>
910

SYCL/Basic/boolean.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@
33
// RUN: %CPU_RUN_PLACEHOLDER %t.out
44
// RUN: %GPU_RUN_PLACEHOLDER %t.out
55
// RUN: %ACC_RUN_PLACEHOLDER %t.out
6-
#include <sycl/sycl.hpp>
7-
86
#include <cassert>
7+
#include <iostream>
8+
#include <sycl/sycl.hpp>
99

1010
using namespace sycl;
1111
namespace s = sycl;

SYCL/Basic/buffer/buffer.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,10 @@
1414
//
1515
//===----------------------------------------------------------------------===//
1616

17-
#include <sycl/sycl.hpp>
18-
1917
#include <cassert>
18+
#include <iostream>
2019
#include <memory>
20+
#include <sycl/sycl.hpp>
2121

2222
using namespace sycl;
2323

SYCL/Basic/buffer/buffer_create.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
// RUN: env ZE_DEBUG=1 %GPU_RUN_PLACEHOLDER %t.out 2> %t1.out; cat %t1.out %GPU_CHECK_PLACEHOLDER
44
// UNSUPPORTED: ze_debug-1,ze_debug4
55

6+
#include <iostream>
67
#include <sycl/sycl.hpp>
78

89
using namespace sycl;

SYCL/Basic/buffer/buffer_full_copy.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
//===----------------------------------------------------------------------===//
1616

1717
#include <cassert>
18+
#include <iostream>
1819
#include <sycl/sycl.hpp>
1920

2021
void check_copy_device_to_host(sycl::queue &Queue) {

SYCL/Basic/buffer/buffer_migrate.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
// root-devices)
99
//
1010

11+
#include <iostream>
1112
#include <sycl/sycl.hpp>
1213
using namespace sycl;
1314

SYCL/Basic/buffer/reinterpret.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,9 @@
1313
//
1414
//===----------------------------------------------------------------------===//
1515

16-
#include <sycl/sycl.hpp>
17-
1816
#include <climits>
17+
#include <iostream>
18+
#include <sycl/sycl.hpp>
1919

2020
// This tests verifies basic cases of using sycl::buffer::reinterpret
2121
// functionality - changing buffer type and range. This test checks that

SYCL/Basic/diagnostics/handler.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
//===----------------------------------------------------------------------===//
1313

1414
#include <cassert>
15+
#include <iostream>
1516
#include <sycl/sycl.hpp>
1617

1718
int main() {

SYCL/Basic/fpga_tests/fpga_dsp_control.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
// RUN: %clangxx -fsycl -fintelfpga %s -o %t.out
1111
// RUN: %ACC_RUN_PLACEHOLDER %t.out
1212

13+
#include <iostream>
1314
#include <sycl/ext/intel/fpga_extensions.hpp>
1415
#include <sycl/sycl.hpp>
1516

SYCL/Basic/fpga_tests/fpga_latency_control_lsu.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
// RUN: %clangxx -fsycl -fintelfpga %s -o %t.out
1111
// RUN: %ACC_RUN_PLACEHOLDER %t.out
1212

13+
#include <iostream>
1314
#include <sycl/ext/intel/fpga_extensions.hpp>
1415
#include <sycl/sycl.hpp>
1516

SYCL/Basic/fpga_tests/fpga_latency_control_pipe.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
// RUN: %clangxx -fsycl -fintelfpga %s -o %t.out
1111
// RUN: %ACC_RUN_PLACEHOLDER %t.out
1212

13+
#include <iostream>
1314
#include <sycl/ext/intel/fpga_extensions.hpp>
1415
#include <sycl/sycl.hpp>
1516

SYCL/Basic/fpga_tests/fpga_lsu.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
// RUN: %clangxx -fsycl -fintelfpga %s -o %t.out
1010
// RUN: %ACC_RUN_PLACEHOLDER %t.out
1111

12+
#include <iostream>
1213
#include <sycl/ext/intel/fpga_extensions.hpp>
1314
#include <sycl/sycl.hpp>
1415

SYCL/Basic/half_type.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,9 @@
1212
//
1313
//===----------------------------------------------------------------------===//
1414

15-
#include <sycl/sycl.hpp>
16-
1715
#include <cmath>
16+
#include <iostream>
17+
#include <sycl/sycl.hpp>
1818
#include <unordered_set>
1919

2020
using namespace sycl;

SYCL/Basic/handler/interop_task.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616

1717
#include "../../helpers.hpp"
1818
#include <chrono>
19+
#include <iostream>
1920
#include <thread>
2021

2122
int main() {

SYCL/Basic/handler/run_on_host_intel.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
//
1111
//===----------------------------------------------------------------------===//
1212

13+
#include <iostream>
1314
#include <sycl/sycl.hpp>
1415

1516
#include "../../helpers.hpp"

SYCL/Basic/handler/run_on_host_intel2.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
// RUN: %HOST_RUN_PLACEHOLDER %t.out
33
// RUN: %CPU_RUN_PLACEHOLDER %t.out
44

5+
#include <iostream>
56
#include <sycl/sycl.hpp>
67

78
// This tests that early free of command (and, hence, the command group) won't

SYCL/Basic/image/image_accessor_readwrite_half.cpp

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,8 @@
1717

1818
#include <cassert>
1919
#include <iomanip>
20-
#include <sycl/sycl.hpp>
21-
#if DEBUG_OUTPUT
2220
#include <iostream>
23-
#endif
21+
#include <sycl/sycl.hpp>
2422

2523
namespace s = sycl;
2624

SYCL/Basic/image/image_max_size.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99

1010
// The test checks that 'image' with max allowed sizes is handled correctly.
1111

12+
#include <iostream>
1213
#include <sycl/sycl.hpp>
1314
using namespace sycl;
1415

SYCL/Basic/image/srgba-read.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
// UNSUPPORTED: cuda
77
// UNSUPPORTED: hip
88

9+
#include <iostream>
910
#include <sycl/sycl.hpp>
1011

1112
using namespace sycl;

SYCL/Basic/kernel_bundle/kernel_bundle_api.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
// -fsycl-device-code-split is not supported for cuda
88
// UNSUPPORTED: cuda || hip
99

10+
#include <iostream>
1011
#include <sycl/sycl.hpp>
1112

1213
#include <algorithm>

SYCL/Basic/linear-sub_group.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
#include <algorithm>
1717
#include <cstdio>
1818
#include <cstdlib>
19+
#include <iostream>
1920
#include <sycl/sycl.hpp>
2021

2122
using namespace sycl;

SYCL/Basic/parallel_for_disable_range_roundup.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@
88
// RUN: %clangxx -fsycl -fsycl-targets=%sycl_triple -sycl-std=2020 %s -o %t.out
99
// RUN: %GPU_RUN_PLACEHOLDER SYCL_PARALLEL_FOR_RANGE_ROUNDING_TRACE=1 %t.out %GPU_CHECK_PLACEHOLDER --check-prefix CHECK-ENABLED
1010

11+
#include <iostream>
1112
#include <sycl/sycl.hpp>
12-
1313
using namespace sycl;
1414

1515
range<1> Range1 = {0};

SYCL/Basic/parallel_for_range_roundup.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
// RUN: %clangxx -fsycl -fsycl-targets=%sycl_triple %s -o %t.out
22
// RUN: env SYCL_PARALLEL_FOR_RANGE_ROUNDING_TRACE=1 %GPU_RUN_PLACEHOLDER %t.out %GPU_CHECK_PLACEHOLDER
33

4+
#include <iostream>
45
#include <sycl/sycl.hpp>
5-
66
using namespace sycl;
77

88
range<1> Range1 = {0};

SYCL/Basic/partition_supported.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ not support the info::partition_affinity_domain provided, an exception with the
1515
**feature_not_supported error code must be thrown**.
1616
*/
1717

18+
#include <iostream>
1819
#include <sycl/sycl.hpp>
19-
2020
/** returns true if the device supports a particular affinity domain
2121
*/
2222
static bool

SYCL/Basic/range_offset_fit_in_int.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
// RUN: %CPU_RUN_PLACEHOLDER %t.out
33

44
#include <climits>
5+
#include <iostream>
56
#include <sycl/sycl.hpp>
67

78
namespace S = sycl;

SYCL/Basic/sampler/sampler.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
//===----------------------------------------------------------------------===//
1414

1515
#include <cassert>
16+
#include <iostream>
1617
#include <sycl/context.hpp>
1718
#include <sycl/sycl.hpp>
1819

SYCL/Basic/stream/auto_flush.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
//
1414
//===----------------------------------------------------------------------===//
1515

16+
#include <iostream>
1617
#include <sycl/sycl.hpp>
1718

1819
using namespace sycl;

SYCL/Basic/stream/stream_max_stmt_exceed.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
// RUN: %GPU_RUN_ON_LINUX_PLACEHOLDER %t.out %GPU_CHECK_ON_LINUX_PLACEHOLDER
55
// RUN: %ACC_RUN_PLACEHOLDER %t.out %ACC_CHECK_PLACEHOLDER
66

7+
#include <iostream>
78
#include <sycl/sycl.hpp>
89

910
#include <cassert>

SYCL/Basic/subdevice_pi.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
// Intel OpenCL CPU Runtime supports device partition on all (multi-core)
77
// platforms. Other devices may not support this.
88

9+
#include <iostream>
910
#include <string>
1011
#include <sycl/sycl.hpp>
1112
#include <vector>

SYCL/Basic/use_pinned_host_memory.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33

44
#include <sycl/sycl.hpp>
55

6+
#include <iostream>
67
#include <string>
78

89
int main() {

SYCL/DeprecatedFeatures/SpecConsts1.2.1/composite-in-functor.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
// CHECK-NEXT: 3
1414
// CHECK-NEXT: 4 : 5
1515

16+
#include <iostream>
1617
#include <sycl/sycl.hpp>
1718

1819
using namespace sycl;

SYCL/DeprecatedFeatures/SpecConsts1.2.1/specialization_constants.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616

1717
#include <chrono>
1818
#include <cstdint>
19+
#include <iostream>
1920
#include <random>
2021
#include <sycl/sycl.hpp>
2122

SYCL/DeprecatedFeatures/SpecConsts1.2.1/specialization_constants_negative.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616

1717
#include <chrono>
1818
#include <cstdint>
19+
#include <iostream>
1920
#include <random>
2021
#include <sycl/sycl.hpp>
2122

SYCL/DeprecatedFeatures/SpecConsts1.2.1/specialization_constants_override.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616

1717
#include <chrono>
1818
#include <cstdint>
19+
#include <iostream>
1920
#include <random>
2021
#include <sycl/sycl.hpp>
2122

SYCL/DeprecatedFeatures/opencl-interop.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
#include <algorithm>
1818
#include <cstdio>
1919
#include <cstdlib>
20+
#include <iostream>
2021
#include <numeric>
2122
#include <sycl/sycl.hpp>
2223

SYCL/DeprecatedFeatures/subbuffer_interop.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
#include <sycl/sycl.hpp>
1717

1818
#include <cassert>
19+
#include <iostream>
1920
#include <memory>
2021
#include <numeric>
2122

SYCL/DeviceLib/assert-windows.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626

2727
#include <array>
2828
#include <assert.h>
29+
#include <iostream>
2930
#include <sycl/sycl.hpp>
3031

3132
using namespace sycl;

SYCL/DeviceLib/assert.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,7 @@
9393

9494
#include <array>
9595
#include <assert.h>
96+
#include <iostream>
9697
#include <stdlib.h>
9798
#include <sycl/sycl.hpp>
9899
#include <sys/types.h>

SYCL/DeviceLib/built-ins/nan.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
// RUN: %GPU_RUN_PLACEHOLDER %t_gpu.out
66
// RUN: %ACC_RUN_PLACEHOLDER %t.out
77

8+
#include <iostream>
89
#include <sycl/sycl.hpp>
910

1011
#include <cassert>

SYCL/DeviceLib/std_complex_math_fp64_test.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
#include <array>
1212
#include <cassert>
1313
#include <complex>
14+
#include <iostream>
1415
#include <sycl/sycl.hpp>
1516

1617
#include "math_utils.hpp"

SYCL/DeviceLib/std_complex_math_test.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
#include <array>
1212
#include <cassert>
1313
#include <complex>
14+
#include <iostream>
1415
#include <sycl/sycl.hpp>
1516

1617
#include "math_utils.hpp"

SYCL/DiscardEvents/discard_events_usm.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@
117117
// CHECK: The test passed.
118118

119119
#include "discard_events_test_queue_ops.hpp"
120-
120+
#include <iostream>
121121
int main(int Argc, const char *Argv[]) {
122122

123123
sycl::property_list Props{

0 commit comments

Comments
 (0)