Skip to content

Commit 81f3edc

Browse files
authored
Merge pull request intel#921 from bb-sycl/xmain
Auto pulldown and update tc files for xmain branch on 20220512
2 parents d022438 + 2c753c3 commit 81f3edc

27 files changed

+738
-531
lines changed

SYCL/Basic/fpga_tests/fpga_latency_control_lsu.cpp

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -40,11 +40,16 @@ int test_latency_control(queue Queue) {
4040
auto in_ptr = input_accessor.get_pointer();
4141
auto out_ptr = output_accessor.get_pointer();
4242

43-
float value = PrefetchingLSU::load<
44-
ext::intel::experimental::latency_anchor_id<0>>(in_ptr);
45-
46-
BurstCoalescedLSU::store<ext::intel::experimental::latency_constraint<
47-
0, ext::intel::experimental::type::exact, 5>>(out_ptr, value);
43+
float value = PrefetchingLSU::load(
44+
in_ptr, ext::oneapi::experimental::properties(
45+
ext::intel::experimental::latency_anchor_id<0>));
46+
47+
BurstCoalescedLSU::store(
48+
out_ptr, value,
49+
ext::oneapi::experimental::properties(
50+
ext::intel::experimental::latency_constraint<
51+
0, ext::intel::experimental::latency_control_type::exact,
52+
5>));
4853
});
4954
});
5055
}

SYCL/Basic/fpga_tests/fpga_latency_control_pipe.cpp

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -34,12 +34,16 @@ int test_latency_control(queue Queue) {
3434
cgh.single_task<class kernel>([=] {
3535
Pipe1::write(input_accessor[0]);
3636

37-
int value =
38-
Pipe1::read<ext::intel::experimental::latency_anchor_id<0>>();
39-
40-
Pipe2::write<ext::intel::experimental::latency_anchor_id<1>,
41-
ext::intel::experimental::latency_constraint<
42-
0, ext::intel::experimental::type::exact, 2>>(value);
37+
int value = Pipe1::read(ext::oneapi::experimental::properties(
38+
ext::intel::experimental::latency_anchor_id<0>));
39+
40+
Pipe2::write(
41+
value,
42+
ext::oneapi::experimental::properties(
43+
ext::intel::experimental::latency_anchor_id<1>,
44+
ext::intel::experimental::latency_constraint<
45+
0, ext::intel::experimental::latency_control_type::exact,
46+
2>));
4347

4448
output_accessor[0] = Pipe2::read();
4549
});

SYCL/ESIMD/api/simd_view_select_2d.cpp renamed to SYCL/ESIMD/api/simd_view_select_2d.hpp

Lines changed: 1 addition & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,10 @@
1-
//==------- simd_view_select_2d.cpp - DPC++ ESIMD on-device test ----------==//
1+
//==------- simd_view_select_2d.hpp - DPC++ ESIMD on-device test ----------==//
22
//
33
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
44
// See https://llvm.org/LICENSE.txt for license information.
55
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
66
//
77
//===----------------------------------------------------------------------===//
8-
// REQUIRES: gpu
9-
// UNSUPPORTED: cuda || hip
10-
// TODO: esimd_emulator fails due to unimplemented 'single_task()' method
11-
// XFAIL: esimd_emulator
12-
// RUN: %clangxx -fsycl %s -fsycl-device-code-split=per_kernel -o %t.out
13-
// RUN: %GPU_RUN_PLACEHOLDER %t.out
148
//
159
// Smoke test for 2D region select API which can be used to represent 2D tiles.
1610

@@ -171,21 +165,3 @@ template <class T> bool test(queue q) {
171165
passed &= test_impl<T, 9, 17, 5, /**/ 3, 5, 2, /**/ 2, 3, 1>(q, 2, 1, 0);
172166
return passed;
173167
}
174-
175-
int main(int argc, char **argv) {
176-
queue q(esimd_test::ESIMDSelector{}, esimd_test::createExceptionHandler());
177-
auto dev = q.get_device();
178-
std::cout << "Running on " << dev.get_info<info::device::name>() << "\n";
179-
180-
bool passed = true;
181-
passed &= test<char>(q);
182-
passed &= test<unsigned short>(q);
183-
passed &= test<half>(q);
184-
passed &= test<int>(q);
185-
passed &= test<float>(q);
186-
passed &= test<double>(q);
187-
passed &= test<uint64_t>(q);
188-
189-
std::cout << (passed ? "=== Test passed\n" : "=== Test FAILED\n");
190-
return passed ? 0 : 1;
191-
}
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
//==------- simd_view_select_2d_fp.cpp - DPC++ ESIMD on-device test -------==//
2+
//
3+
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4+
// See https://llvm.org/LICENSE.txt for license information.
5+
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6+
//
7+
//===----------------------------------------------------------------------===//
8+
// REQUIRES: gpu
9+
// UNSUPPORTED: cuda || hip
10+
// TODO: esimd_emulator fails due to unimplemented 'single_task()' method
11+
// XFAIL: esimd_emulator
12+
// RUN: %clangxx -fsycl %s -fsycl-device-code-split=per_kernel -o %t.out
13+
// RUN: %GPU_RUN_PLACEHOLDER %t.out
14+
//
15+
// Smoke test for 2D region select API which can be used to represent 2D tiles.
16+
// Tests FP types.
17+
18+
#include "simd_view_select_2d.hpp"
19+
20+
int main(int argc, char **argv) {
21+
queue q(esimd_test::ESIMDSelector{}, esimd_test::createExceptionHandler());
22+
auto dev = q.get_device();
23+
std::cout << "Running on " << dev.get_info<info::device::name>() << "\n";
24+
25+
bool passed = true;
26+
passed &= test<half>(q);
27+
passed &= test<float>(q);
28+
passed &= test<double>(q);
29+
30+
std::cout << (passed ? "=== Test passed\n" : "=== Test FAILED\n");
31+
return passed ? 0 : 1;
32+
}
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
//==------- simd_view_select_2d_int.cpp - DPC++ ESIMD on-device test ------==//
2+
//
3+
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4+
// See https://llvm.org/LICENSE.txt for license information.
5+
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6+
//
7+
//===----------------------------------------------------------------------===//
8+
// REQUIRES: gpu
9+
// UNSUPPORTED: cuda || hip
10+
// RUN: %clangxx -fsycl %s -fsycl-device-code-split=per_kernel -o %t.out
11+
// RUN: %GPU_RUN_PLACEHOLDER %t.out
12+
//
13+
// Smoke test for 2D region select API which can be used to represent 2D tiles.
14+
// Tests int types.
15+
16+
#include "simd_view_select_2d.hpp"
17+
18+
int main(int argc, char **argv) {
19+
queue q(esimd_test::ESIMDSelector{}, esimd_test::createExceptionHandler());
20+
auto dev = q.get_device();
21+
std::cout << "Running on " << dev.get_info<info::device::name>() << "\n";
22+
23+
bool passed = true;
24+
passed &= test<char>(q);
25+
passed &= test<unsigned short>(q);
26+
passed &= test<int>(q);
27+
passed &= test<uint64_t>(q);
28+
29+
std::cout << (passed ? "=== Test passed\n" : "=== Test FAILED\n");
30+
return passed ? 0 : 1;
31+
}

0 commit comments

Comments
 (0)