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

[SYCL][CUDA] Explicitly adding extension headers in tests. #1072

Merged
merged 4 commits into from
Jul 1, 2022
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
6 changes: 3 additions & 3 deletions SYCL/BFloat16/bfloat16_builtins.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,14 @@
//
// RUN: %clangxx -fsycl -fsycl-targets=%sycl_triple %s -o %t.out -Xsycl-target-backend --cuda-gpu-arch=sm_80
// RUN: %t.out

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

#include <cmath>
#include <vector>

using namespace cl::sycl;
using sycl::ext::oneapi::experimental::bfloat16;
using namespace sycl;
using namespace sycl::ext::oneapi::experimental;

constexpr int N = 60; // divisible by all tested array sizes
constexpr float bf16_eps = 0.00390625;
Expand Down
3 changes: 2 additions & 1 deletion SYCL/DeviceLib/built-ins/ext_native_math.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,9 @@
// OpenCL CPU driver does not support cl_khr_fp16 extension for this reason this
// test is compiled with the -fsycl-device-code-split flag

#include <CL/sycl.hpp>
#include <cassert>
#include <sycl/ext/oneapi/experimental/builtins.hpp>
#include <sycl/sycl.hpp>

template <typename T> void assert_out_of_bound(T val, T lower, T upper) {
assert(sycl::all(lower < val && val < upper));
Expand Down
2 changes: 1 addition & 1 deletion SYCL/Matrix/element_wise_all_ops_cuda.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
// RUN: %clangxx -fsycl -fsycl-targets=%sycl_triple -Xsycl-target-backend --cuda-gpu-arch=sm_80 -DSYCL_EXT_ONEAPI_MATRIX=3 %s -o %t.out
// RUN: %t.out

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

using namespace sycl;
using namespace sycl::ext::oneapi::experimental::matrix;
Expand Down
3 changes: 2 additions & 1 deletion SYCL/Matrix/element_wise_wi_marray.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,12 @@
// RUN: %clangxx -fsycl -fsycl-targets=%sycl_triple -Xsycl-target-backend --cuda-gpu-arch=sm_80 -DSYCL_EXT_ONEAPI_MATRIX=3 %s -o %t.out
// RUN: %t.out

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

using namespace sycl;
using namespace sycl::ext::oneapi::experimental;
using namespace sycl::ext::oneapi::experimental::matrix;
using sycl::ext::oneapi::experimental::bfloat16;

#define SG_SZ 32

Expand Down
4 changes: 2 additions & 2 deletions SYCL/Matrix/joint_matrix_tensorcore.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@
// supported for the Nvidia matrix extension, although some JIT optimizations
// are performed at the level of the PTX assembly code.

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

using namespace sycl;
using namespace sycl::ext::oneapi::experimental;
using namespace sycl::ext::oneapi::experimental::matrix;
using sycl::ext::oneapi::experimental::bfloat16;
constexpr float bf16_eps = 0.00390625;

// Example usage of Nvidia matrix multiply.
Expand Down
3 changes: 2 additions & 1 deletion SYCL/Printf/char.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@
// CHECK: literal strings: s=Hello World!
// CHECK_DISABLED: non-literal strings: s=Hello, World! ls=

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

#include <cstring>

Expand Down
3 changes: 2 additions & 1 deletion SYCL/Printf/double.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@

#include <iostream>

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

#include "helper.hpp"

Expand Down
3 changes: 2 additions & 1 deletion SYCL/Printf/float.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,8 @@

#include <iostream>

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

#include "helper.hpp"

Expand Down
3 changes: 2 additions & 1 deletion SYCL/Printf/int.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@
// RUN: %GPU_RUN_PLACEHOLDER %t.constant.out %GPU_CHECK_PLACEHOLDER
// RUN: %ACC_RUN_PLACEHOLDER %t.constant.out %ACC_CHECK_PLACEHOLDER

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

#include "helper.hpp"

Expand Down
3 changes: 2 additions & 1 deletion SYCL/Printf/long.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@
// RUN: %GPU_RUN_PLACEHOLDER %t.constant.out %GPU_CHECK_PLACEHOLDER
// RUN: %ACC_RUN_PLACEHOLDER %t.constant.out %ACC_CHECK_PLACEHOLDER

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

#include "helper.hpp"

Expand Down
3 changes: 2 additions & 1 deletion SYCL/Printf/mixed-address-space.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@
// CHECK: Constant addrspace literal
// CHECK: Generic addrspace literal

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

#include "helper.hpp"

Expand Down
3 changes: 2 additions & 1 deletion SYCL/Printf/percent-symbol.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@
// CHECK: %c %s %d %i %o %x %X %u
// CHECK-NEXT: %f %F %e %E %a %A %g %G %n %p

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

#include <cstring>

Expand Down