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

Commit 8126c4c

Browse files
committed
Merge remote-tracking branch 'public/intel' into private/vromanov/MoreUseSYCLSYCL
2 parents fb5abf7 + 0f5fb49 commit 8126c4c

File tree

140 files changed

+691
-488
lines changed

Some content is hidden

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

140 files changed

+691
-488
lines changed

.github/CODEOWNERS

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,15 +29,13 @@ SYCL/DotProduct @rdeodhar
2929
# Explicit SIMD
3030
SYCL/ESIMD @kbobrovs @DenisBakhvalov
3131

32-
# Function pointers
33-
SYCL/FunctionPointers @AlexeySachkov
34-
3532
# Functor
3633
SYCL/Functor @AlexeySachkov
3734

3835
# Group algorithms
3936
SYCL/GroupAlgorithm @Pennycook @AlexeySachkov
4037
SYCL/SubGroup @Pennycook @AlexeySachkov
38+
SYCL/GroupMask @Pennycook @vladimilaz
4139

4240
# Group local memory
4341
SYCL/GroupLocalMemory @sergey-semenov @Pennycook
@@ -74,3 +72,6 @@ SYCL/Basic/stream @againull
7472

7573
#BFloat16 conversion
7674
SYCL/BFloat16 @AlexeySotkin @MrSidims
75+
76+
# Deprecated features
77+
SYCL/DeprecatedFeatures @intel/llvm-reviewers-runtime

SYCL/AOT/spec_const_aot.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,8 @@ int main(int argc, char **argv) {
3636
<< "\n";
3737
cl::sycl::program prog(q.get_context());
3838

39-
cl::sycl::ONEAPI::experimental::spec_constant<int32_t, MyInt32Const> i32 =
40-
prog.set_spec_constant<MyInt32Const>(10);
39+
cl::sycl::ext::oneapi::experimental::spec_constant<int32_t, MyInt32Const>
40+
i32 = prog.set_spec_constant<MyInt32Const>(10);
4141

4242
prog.build_with_kernel_type<Kernel>();
4343

SYCL/AtomicRef/accessor.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
#include <numeric>
1111
#include <vector>
1212
using namespace sycl;
13-
using namespace sycl::ONEAPI;
13+
using namespace sycl::ext::oneapi;
1414

1515
// Equivalent to add_test from add.cpp
1616
// Uses atomic_accessor instead of atomic_ref

SYCL/AtomicRef/assignment.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@ template <typename T> void assignment_test(queue q, size_t N) {
2121
assignment_buf.template get_access<access::mode::read_write>(cgh);
2222
cgh.parallel_for<assignment_kernel<T>>(range<1>(N), [=](item<1> it) {
2323
size_t gid = it.get_id(0);
24-
auto atm = atomic_ref<T, ONEAPI::memory_order::relaxed,
25-
ONEAPI::memory_scope::device,
24+
auto atm = atomic_ref<T, ext::oneapi::memory_order::relaxed,
25+
ext::oneapi::memory_scope::device,
2626
access::address_space::global_space>(st[0]);
2727
atm = T(gid);
2828
});

SYCL/Basic/accessor/Inputs/host_task_accessor.cpp

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -54,9 +54,6 @@ int main() {
5454

5555
#if defined(accessor_new_api_test) || defined(buffer_new_api_test)
5656
cgh.host_task([=]() {
57-
#else
58-
cgh.codeplay_host_task([=]() {
59-
#endif
6057
acc_7[6] = acc_1[0];
6158
acc_8[7] = acc_2[1];
6259
acc_9[7] = acc_3[1];
@@ -65,6 +62,7 @@ int main() {
6562
acc_3[1] = acc_6[4];
6663
});
6764
});
65+
#endif
6866
Queue.wait();
6967

7068
#if defined(accessor_new_api_test)
@@ -115,16 +113,14 @@ int main() {
115113

116114
#if defined(accessor_new_api_test) || defined(buffer_new_api_test)
117115
cgh.host_task([=]() {
118-
#else
119-
cgh.codeplay_host_task([=]() {
120-
#endif
121116
acc_7[6] = acc_1[0];
122117
acc_8[7] = acc_2[1];
123118
acc_9[7] = acc_3[1];
124119
acc_1[0] = 4;
125120
acc_2[1] = 5;
126121
acc_3[1] = 6;
127122
});
123+
#endif
128124
});
129125
Queue.wait();
130126

SYCL/Basic/enqueue_barrier.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
// UNSUPPORTED: cuda || windows
99

1010
#include <CL/sycl.hpp>
11-
#include <CL/sycl/INTEL/fpga_device_selector.hpp>
11+
#include <sycl/ext/intel/fpga_device_selector.hpp>
1212

1313
int main() {
1414
sycl::context Context;

SYCL/Basic/fpga_tests/buffer_location.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,8 @@ int main() {
88
sycl::buffer<int, 1> Buf{sycl::range{1}};
99

1010
Queue.submit([&](sycl::handler &CGH) {
11-
sycl::ONEAPI::accessor_property_list PL{sycl::INTEL::buffer_location<1>};
11+
sycl::ext::oneapi::accessor_property_list PL{
12+
sycl::ext::intel::buffer_location<1>};
1213
sycl::accessor Acc(Buf, CGH, sycl::write_only, PL);
1314
CGH.single_task<class Test>([=]() { Acc[0] = 42; });
1415
});

SYCL/Basic/fpga_tests/fpga_io_pipes.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@
88
//
99
//===----------------------------------------------------------------------===//
1010
#include <CL/sycl.hpp>
11-
#include <CL/sycl/INTEL/fpga_extensions.hpp>
1211
#include <fstream>
1312
#include <iostream>
13+
#include <sycl/ext/intel/fpga_extensions.hpp>
1414

1515
#include "io_pipe_def.h"
1616

@@ -113,11 +113,11 @@ int test_io_bl_pipe(cl::sycl::queue Queue) {
113113
}
114114

115115
int main() {
116-
cl::sycl::queue Queue{cl::sycl::INTEL::fpga_emulator_selector{}};
116+
cl::sycl::queue Queue{cl::sycl::ext::intel::fpga_emulator_selector{}};
117117

118118
if (!Queue.get_device()
119119
.get_info<cl::sycl::info::device::kernel_kernel_pipe_support>()) {
120-
std::cout << "SYCL_INTEL_data_flow_pipes not supported, skipping"
120+
std::cout << "SYCL_ext_intel_data_flow_pipes not supported, skipping"
121121
<< std::endl;
122122
return 0;
123123
}

SYCL/Basic/fpga_tests/fpga_lsu.cpp

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
//
99
//===----------------------------------------------------------------------===//
1010
#include <CL/sycl.hpp>
11-
#include <CL/sycl/INTEL/fpga_extensions.hpp>
11+
#include <sycl/ext/intel/fpga_extensions.hpp>
1212

1313
// TODO: run is disabled, since no support added in FPGA backend yet. Check
1414
// implementation correctness from CXX and SYCL languages perspective.
@@ -38,20 +38,20 @@ int test_lsu(cl::sycl::queue Queue) {
3838
auto input_ptr = input_accessor.get_pointer();
3939
auto output_ptr = output_accessor.get_pointer();
4040

41-
using PrefetchingLSU =
42-
cl::sycl::INTEL::lsu<cl::sycl::INTEL::prefetch<true>,
43-
cl::sycl::INTEL::statically_coalesce<false>>;
41+
using PrefetchingLSU = cl::sycl::ext::intel::lsu<
42+
cl::sycl::ext::intel::prefetch<true>,
43+
cl::sycl::ext::intel::statically_coalesce<false>>;
4444

45-
using BurstCoalescedLSU =
46-
cl::sycl::INTEL::lsu<cl::sycl::INTEL::burst_coalesce<true>,
47-
cl::sycl::INTEL::statically_coalesce<false>>;
45+
using BurstCoalescedLSU = cl::sycl::ext::intel::lsu<
46+
cl::sycl::ext::intel::burst_coalesce<true>,
47+
cl::sycl::ext::intel::statically_coalesce<false>>;
4848

49-
using CachingLSU =
50-
cl::sycl::INTEL::lsu<cl::sycl::INTEL::burst_coalesce<true>,
51-
cl::sycl::INTEL::cache<1024>,
52-
cl::sycl::INTEL::statically_coalesce<false>>;
49+
using CachingLSU = cl::sycl::ext::intel::lsu<
50+
cl::sycl::ext::intel::burst_coalesce<true>,
51+
cl::sycl::ext::intel::cache<1024>,
52+
cl::sycl::ext::intel::statically_coalesce<false>>;
5353

54-
using PipelinedLSU = cl::sycl::INTEL::lsu<>;
54+
using PipelinedLSU = cl::sycl::ext::intel::lsu<>;
5555

5656
int X = PrefetchingLSU::load(input_ptr); // int X = input_ptr[0]
5757
int Y = CachingLSU::load(input_ptr + 1); // int Y = input_ptr[1]
@@ -74,7 +74,7 @@ int test_lsu(cl::sycl::queue Queue) {
7474
}
7575

7676
int main() {
77-
cl::sycl::queue Queue{cl::sycl::INTEL::fpga_emulator_selector{}};
77+
cl::sycl::queue Queue{cl::sycl::ext::intel::fpga_emulator_selector{}};
7878

7979
return test_lsu(Queue);
8080
}

SYCL/Basic/fpga_tests/fpga_pipes.cpp

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@
1212
//
1313
//===----------------------------------------------------------------------===//
1414
#include <CL/sycl.hpp>
15-
#include <CL/sycl/INTEL/fpga_extensions.hpp>
1615
#include <iostream>
16+
#include <sycl/ext/intel/fpga_extensions.hpp>
1717

1818
// Size of an array passing through a pipe
1919
constexpr size_t N = 10;
@@ -31,7 +31,7 @@ template <int N> class templ_nb_pipe;
3131

3232
// For non-blocking multiple pipes
3333
template <int N>
34-
using PipeMulNb = cl::sycl::INTEL::pipe<class templ_nb_pipe<N>, int>;
34+
using PipeMulNb = cl::sycl::ext::intel::pipe<class templ_nb_pipe<N>, int>;
3535

3636
// For simple blocking pipes with explicit type
3737
class some_bl_pipe;
@@ -46,7 +46,7 @@ template <int N> class templ_bl_pipe;
4646

4747
// For blocking multiple pipes
4848
template <int N>
49-
using PipeMulBl = cl::sycl::INTEL::pipe<class templ_bl_pipe<N>, int>;
49+
using PipeMulBl = cl::sycl::ext::intel::pipe<class templ_bl_pipe<N>, int>;
5050

5151
// Kernel names
5252
template <int TestNumber, int KernelNumber = 0> class writer;
@@ -57,7 +57,7 @@ template <typename PipeName, int TestNumber>
5757
int test_simple_nb_pipe(cl::sycl::queue Queue) {
5858
int data[] = {0};
5959

60-
using Pipe = cl::sycl::INTEL::pipe<PipeName, int>;
60+
using Pipe = cl::sycl::ext::intel::pipe<PipeName, int>;
6161

6262
cl::sycl::buffer<int, 1> readBuf(data, 1);
6363
Queue.submit([&](cl::sycl::handler &cgh) {
@@ -146,7 +146,7 @@ template <int TestNumber> int test_multiple_nb_pipe(cl::sycl::queue Queue) {
146146
// Test for array passing through a non-blocking pipe
147147
template <int TestNumber> int test_array_th_nb_pipe(cl::sycl::queue Queue) {
148148
int data[N] = {0};
149-
using AnotherNbPipe = cl::sycl::INTEL::pipe<class another_nb_pipe, int>;
149+
using AnotherNbPipe = cl::sycl::ext::intel::pipe<class another_nb_pipe, int>;
150150

151151
Queue.submit([&](cl::sycl::handler &cgh) {
152152
cgh.single_task<class writer<TestNumber>>([=]() {
@@ -188,7 +188,7 @@ template <typename PipeName, int TestNumber>
188188
int test_simple_bl_pipe(cl::sycl::queue Queue) {
189189
int data[] = {0};
190190

191-
using Pipe = cl::sycl::INTEL::pipe<PipeName, int>;
191+
using Pipe = cl::sycl::ext::intel::pipe<PipeName, int>;
192192

193193
cl::sycl::buffer<int, 1> readBuf(data, 1);
194194
Queue.submit([&](cl::sycl::handler &cgh) {
@@ -256,7 +256,7 @@ template <int TestNumber> int test_multiple_bl_pipe(cl::sycl::queue Queue) {
256256
// Test for array passing through a blocking pipe
257257
template <int TestNumber> int test_array_th_bl_pipe(cl::sycl::queue Queue) {
258258
int data[N] = {0};
259-
using AnotherBlPipe = cl::sycl::INTEL::pipe<class another_bl_pipe, int>;
259+
using AnotherBlPipe = cl::sycl::ext::intel::pipe<class another_bl_pipe, int>;
260260

261261
Queue.submit([&](cl::sycl::handler &cgh) {
262262
cgh.single_task<class writer<TestNumber>>([=]() {
@@ -290,7 +290,7 @@ int main() {
290290

291291
if (!Queue.get_device()
292292
.get_info<cl::sycl::info::device::kernel_kernel_pipe_support>()) {
293-
std::cout << "SYCL_INTEL_data_flow_pipes not supported, skipping"
293+
std::cout << "SYCL_ext_intel_data_flow_pipes not supported, skipping"
294294
<< std::endl;
295295
return 0;
296296
}

SYCL/Basic/fpga_tests/global_fpga_device_selector.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,12 @@
44
// RUN: %ACC_RUN_PLACEHOLDER %t.out
55

66
#include <CL/sycl.hpp>
7-
#include <CL/sycl/INTEL/fpga_extensions.hpp>
7+
#include <sycl/ext/intel/fpga_extensions.hpp>
88

99
// Check that FPGA emulator device is found if we try to initialize inline
1010
// global variable using fpga_emulator_selector parameter.
1111

1212
inline cl::sycl::queue fpga_emu_queue_inlined{
13-
cl::sycl::INTEL::fpga_emulator_selector{}};
13+
cl::sycl::ext::intel::fpga_emulator_selector{}};
1414

1515
int main() { return 0; }

SYCL/Basic/fpga_tests/io_pipe_def.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
#include <CL/sycl/INTEL/fpga_extensions.hpp>
1+
#include <sycl/ext/intel/fpga_extensions.hpp>
22

33
namespace intelfpga {
44
template <unsigned ID> struct ethernet_pipe_id {
55
static constexpr unsigned id = ID;
66
};
77

88
using ethernet_read_pipe =
9-
sycl::INTEL::kernel_readable_io_pipe<ethernet_pipe_id<0>, int, 0>;
9+
sycl::ext::intel::kernel_readable_io_pipe<ethernet_pipe_id<0>, int, 0>;
1010
using ethernet_write_pipe =
11-
sycl::INTEL::kernel_writeable_io_pipe<ethernet_pipe_id<1>, int, 0>;
11+
sycl::ext::intel::kernel_writeable_io_pipe<ethernet_pipe_id<1>, int, 0>;
1212
} // namespace intelfpga

SYCL/Basic/fpga_tests/pipes_info.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ int main() {
2323
Device.get_info<cl::sycl::info::device::kernel_kernel_pipe_support>();
2424

2525
// Query for platform string. We expect only Intel FPGA platforms to support
26-
// SYCL_INTEL_data_flow_pipes extension.
26+
// SYCL_ext_intel_data_flow_pipes extension.
2727
std::string platform_name =
2828
Platform.get_info<cl::sycl::info::platform::name>();
2929
bool SupposedToBeSupported =

SYCL/Basic/kernel_bundle/kernel_bundle_api.cpp

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -34,19 +34,19 @@ void checkException(TryBodyT TryBody, const std::string &ExpectedErrMsg) {
3434
}
3535

3636
int main() {
37-
sycl::queue Q;
38-
sycl::queue Q2;
37+
const sycl::device Dev{sycl::default_selector{}};
38+
const sycl::device Dev2{sycl::default_selector{}};
39+
40+
const sycl::context Ctx{Dev};
41+
const sycl::context Ctx2{Dev2};
42+
43+
sycl::queue Q{Ctx, Dev};
44+
sycl::queue Q2{Ctx2, Dev2};
3945

4046
// No support for host device so far.
4147
if (Q.is_host() || Q2.is_host())
4248
return 0;
4349

44-
const sycl::context Ctx = Q.get_context();
45-
const sycl::device Dev = Q.get_device();
46-
47-
const sycl::context Ctx2 = Q2.get_context();
48-
const sycl::device Dev2 = Q2.get_device();
49-
5050
// The code is needed to just have device images in the executable
5151
if (0) {
5252
Q.submit([](sycl::handler &CGH) { CGH.single_task<Kernel1Name>([]() {}); });

SYCL/Basic/linear-sub_group.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ int main(int argc, char *argv[]) {
3838
nd_range<2>(range<2>(outer, inner), range<2>(outer, inner)),
3939
[=](nd_item<2> it) {
4040
id<2> idx = it.get_global_id();
41-
ONEAPI::sub_group sg = it.get_sub_group();
41+
ext::oneapi::sub_group sg = it.get_sub_group();
4242
output[idx] = sg.get_group_id()[0] * sg.get_local_range()[0] +
4343
sg.get_local_id()[0];
4444
});

SYCL/Basic/platform.cpp

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ using namespace cl::sycl;
1616

1717
int main() {
1818
int i = 1;
19-
vector_class<platform> openclPlatforms;
19+
std::vector<platform> openclPlatforms;
2020
for (const auto &plt : platform::get_platforms()) {
2121
std::cout << "Platform " << i++
2222
<< " is available: " << ((plt.is_host()) ? "host: " : "OpenCL: ")
@@ -34,9 +34,9 @@ int main() {
3434
{
3535
std::cout << "move constructor" << std::endl;
3636
platform Platform(platformA);
37-
size_t hash = hash_class<platform>()(Platform);
37+
size_t hash = std::hash<platform>()(Platform);
3838
platform MovedPlatform(std::move(Platform));
39-
assert(hash == hash_class<platform>()(MovedPlatform));
39+
assert(hash == std::hash<platform>()(MovedPlatform));
4040
assert(platformA.is_host() == MovedPlatform.is_host());
4141
if (!platformA.is_host() &&
4242
platformA.get_backend() == cl::sycl::backend::opencl) {
@@ -46,10 +46,10 @@ int main() {
4646
{
4747
std::cout << "move assignment operator" << std::endl;
4848
platform Platform(platformA);
49-
size_t hash = hash_class<platform>()(Platform);
49+
size_t hash = std::hash<platform>()(Platform);
5050
platform WillMovedPlatform(platformB);
5151
WillMovedPlatform = std::move(Platform);
52-
assert(hash == hash_class<platform>()(WillMovedPlatform));
52+
assert(hash == std::hash<platform>()(WillMovedPlatform));
5353
assert(platformA.is_host() == WillMovedPlatform.is_host());
5454
if (!platformA.is_host() &&
5555
platformA.get_backend() == cl::sycl::backend::opencl) {
@@ -59,21 +59,21 @@ int main() {
5959
{
6060
std::cout << "copy constructor" << std::endl;
6161
platform Platform(platformA);
62-
size_t hash = hash_class<platform>()(Platform);
62+
size_t hash = std::hash<platform>()(Platform);
6363
platform PlatformCopy(Platform);
64-
assert(hash == hash_class<platform>()(Platform));
65-
assert(hash == hash_class<platform>()(PlatformCopy));
64+
assert(hash == std::hash<platform>()(Platform));
65+
assert(hash == std::hash<platform>()(PlatformCopy));
6666
assert(Platform == PlatformCopy);
6767
assert(Platform.is_host() == PlatformCopy.is_host());
6868
}
6969
{
7070
std::cout << "copy assignment operator" << std::endl;
7171
platform Platform(platformA);
72-
size_t hash = hash_class<platform>()(Platform);
72+
size_t hash = std::hash<platform>()(Platform);
7373
platform WillPlatformCopy(platformB);
7474
WillPlatformCopy = Platform;
75-
assert(hash == hash_class<platform>()(Platform));
76-
assert(hash == hash_class<platform>()(WillPlatformCopy));
75+
assert(hash == std::hash<platform>()(Platform));
76+
assert(hash == std::hash<platform>()(WillPlatformCopy));
7777
assert(Platform == WillPlatformCopy);
7878
assert(Platform.is_host() == WillPlatformCopy.is_host());
7979
}

0 commit comments

Comments
 (0)