Skip to content

Commit d1a9f42

Browse files
authored
[SYCL][CUDA] Explicitly adding extension headers in tests. (intel/llvm-test-suite#1072)
Explicitly including the extension headers since tests are complaining about missing extension functions/classes in : intel#975 (comment). Signed-off-by: JackAKirk [email protected]
1 parent b5de4bf commit d1a9f42

12 files changed

+24
-15
lines changed

SYCL/BFloat16/bfloat16_builtins.cpp

+3-3
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,14 @@
66
//
77
// RUN: %clangxx -fsycl -fsycl-targets=%sycl_triple %s -o %t.out -Xsycl-target-backend --cuda-gpu-arch=sm_80
88
// RUN: %t.out
9-
9+
#include <sycl/ext/oneapi/experimental/builtins.hpp>
1010
#include <sycl/sycl.hpp>
1111

1212
#include <cmath>
1313
#include <vector>
1414

15-
using namespace cl::sycl;
16-
using sycl::ext::oneapi::experimental::bfloat16;
15+
using namespace sycl;
16+
using namespace sycl::ext::oneapi::experimental;
1717

1818
constexpr int N = 60; // divisible by all tested array sizes
1919
constexpr float bf16_eps = 0.00390625;

SYCL/DeviceLib/built-ins/ext_native_math.cpp

+2-1
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,9 @@
77
// OpenCL CPU driver does not support cl_khr_fp16 extension for this reason this
88
// test is compiled with the -fsycl-device-code-split flag
99

10-
#include <CL/sycl.hpp>
1110
#include <cassert>
11+
#include <sycl/ext/oneapi/experimental/builtins.hpp>
12+
#include <sycl/sycl.hpp>
1213

1314
template <typename T> void assert_out_of_bound(T val, T lower, T upper) {
1415
assert(sycl::all(lower < val && val < upper));

SYCL/Matrix/element_wise_all_ops_cuda.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
// RUN: %clangxx -fsycl -fsycl-targets=%sycl_triple -Xsycl-target-backend --cuda-gpu-arch=sm_80 -DSYCL_EXT_ONEAPI_MATRIX=3 %s -o %t.out
1111
// RUN: %t.out
1212

13-
#include <CL/sycl.hpp>
13+
#include <sycl/sycl.hpp>
1414

1515
using namespace sycl;
1616
using namespace sycl::ext::oneapi::experimental::matrix;

SYCL/Matrix/element_wise_wi_marray.cpp

+2-1
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,12 @@
1010
// RUN: %clangxx -fsycl -fsycl-targets=%sycl_triple -Xsycl-target-backend --cuda-gpu-arch=sm_80 -DSYCL_EXT_ONEAPI_MATRIX=3 %s -o %t.out
1111
// RUN: %t.out
1212

13+
#include <sycl/ext/oneapi/experimental/builtins.hpp>
1314
#include <sycl/sycl.hpp>
1415

1516
using namespace sycl;
17+
using namespace sycl::ext::oneapi::experimental;
1618
using namespace sycl::ext::oneapi::experimental::matrix;
17-
using sycl::ext::oneapi::experimental::bfloat16;
1819

1920
#define SG_SZ 32
2021

SYCL/Matrix/joint_matrix_tensorcore.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,11 @@
77
// supported for the Nvidia matrix extension, although some JIT optimizations
88
// are performed at the level of the PTX assembly code.
99

10-
#include <CL/sycl.hpp>
10+
#include <sycl/sycl.hpp>
1111

1212
using namespace sycl;
13+
using namespace sycl::ext::oneapi::experimental;
1314
using namespace sycl::ext::oneapi::experimental::matrix;
14-
using sycl::ext::oneapi::experimental::bfloat16;
1515
constexpr float bf16_eps = 0.00390625;
1616

1717
// Example usage of Nvidia matrix multiply.

SYCL/Printf/char.cpp

+2-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,8 @@
2525
// CHECK: literal strings: s=Hello World!
2626
// CHECK_DISABLED: non-literal strings: s=Hello, World! ls=
2727

28-
#include <CL/sycl.hpp>
28+
#include <sycl/ext/oneapi/experimental/builtins.hpp>
29+
#include <sycl/sycl.hpp>
2930

3031
#include <cstring>
3132

SYCL/Printf/double.cpp

+2-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,8 @@
2828

2929
#include <iostream>
3030

31-
#include <CL/sycl.hpp>
31+
#include <sycl/ext/oneapi/experimental/builtins.hpp>
32+
#include <sycl/sycl.hpp>
3233

3334
#include "helper.hpp"
3435

SYCL/Printf/float.cpp

+2-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,8 @@
3131

3232
#include <iostream>
3333

34-
#include <CL/sycl.hpp>
34+
#include <sycl/ext/oneapi/experimental/builtins.hpp>
35+
#include <sycl/sycl.hpp>
3536

3637
#include "helper.hpp"
3738

SYCL/Printf/int.cpp

+2-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,8 @@
2020
// RUN: %GPU_RUN_PLACEHOLDER %t.constant.out %GPU_CHECK_PLACEHOLDER
2121
// RUN: %ACC_RUN_PLACEHOLDER %t.constant.out %ACC_CHECK_PLACEHOLDER
2222

23-
#include <CL/sycl.hpp>
23+
#include <sycl/ext/oneapi/experimental/builtins.hpp>
24+
#include <sycl/sycl.hpp>
2425

2526
#include "helper.hpp"
2627

SYCL/Printf/long.cpp

+2-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,8 @@
2020
// RUN: %GPU_RUN_PLACEHOLDER %t.constant.out %GPU_CHECK_PLACEHOLDER
2121
// RUN: %ACC_RUN_PLACEHOLDER %t.constant.out %ACC_CHECK_PLACEHOLDER
2222

23-
#include <CL/sycl.hpp>
23+
#include <sycl/ext/oneapi/experimental/builtins.hpp>
24+
#include <sycl/sycl.hpp>
2425

2526
#include "helper.hpp"
2627

SYCL/Printf/mixed-address-space.cpp

+2-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@
1212
// CHECK: Constant addrspace literal
1313
// CHECK: Generic addrspace literal
1414

15-
#include <CL/sycl.hpp>
15+
#include <sycl/ext/oneapi/experimental/builtins.hpp>
16+
#include <sycl/sycl.hpp>
1617

1718
#include "helper.hpp"
1819

SYCL/Printf/percent-symbol.cpp

+2-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,8 @@
2323
// CHECK: %c %s %d %i %o %x %X %u
2424
// CHECK-NEXT: %f %F %e %E %a %A %g %G %n %p
2525

26-
#include <CL/sycl.hpp>
26+
#include <sycl/ext/oneapi/experimental/builtins.hpp>
27+
#include <sycl/sycl.hpp>
2728

2829
#include <cstring>
2930

0 commit comments

Comments
 (0)