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

Commit d2db994

Browse files
committed
Merge remote-tracking branch 'intel_llvm/intel' into simd_view_from_simd
2 parents aa97101 + 7de5c03 commit d2db994

File tree

7 files changed

+43
-46
lines changed

7 files changed

+43
-46
lines changed

SYCL/Basic/barrier_order.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ int main() {
1818

1919
q.single_task<class kernel1>([=] { *x = 1; });
2020

21-
q.submit_barrier();
21+
q.ext_oneapi_submit_barrier();
2222

2323
q.single_task<class kernel2>([=] {
2424
if (*x == 1) {

SYCL/Basic/enqueue_barrier.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,8 @@ int main() {
2727
Q1.submit(
2828
[&](sycl::handler &cgh) { cgh.single_task<class kernel4>([]() {}); });
2929

30-
// call queue::submit_barrier()
31-
Q1.submit_barrier();
30+
// call queue::ext_oneapi_submit_barrier()
31+
Q1.ext_oneapi_submit_barrier();
3232

3333
sycl::queue Q2(Context, sycl::default_selector{});
3434
sycl::queue Q3(Context, sycl::default_selector{});
@@ -51,8 +51,8 @@ int main() {
5151
auto Event4 = Q2.submit(
5252
[&](sycl::handler &cgh) { cgh.single_task<class kernel9>([]() {}); });
5353

54-
// call queue::submit_barrier(const std::vector<event> &WaitList)
55-
Q3.submit_barrier({Event3, Event4});
54+
// call queue::ext_oneapi_submit_barrier(const std::vector<event> &WaitList)
55+
Q3.ext_oneapi_submit_barrier({Event3, Event4});
5656

5757
Q3.submit(
5858
[&](sycl::handler &cgh) { cgh.single_task<class kernel10>([]() {}); });

SYCL/Basic/get_backend.cpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,6 @@
11
// RUN: %clangxx -fsycl -fsycl-targets=%sycl_triple %s -o %t.out
22
// RUN: env SYCL_DEVICE_FILTER=%sycl_be %t.out
33
//
4-
// Failing on HIP AMD
5-
// XFAIL: hip_amd
6-
//
74
//==----------------- get_backend.cpp ------------------------==//
85
// This is a test of get_backend().
96
// Do not set SYCL_DEVICE_FILTER. We do not want the preferred
@@ -21,6 +18,7 @@ bool check(backend be) {
2118
case backend::opencl:
2219
case backend::ext_oneapi_level_zero:
2320
case backend::ext_oneapi_cuda:
21+
case backend::ext_oneapi_hip:
2422
case backend::host:
2523
return true;
2624
default:
@@ -62,6 +60,7 @@ int main() {
6260
if (e.get_backend() != plt.get_backend()) {
6361
return_fail();
6462
}
63+
free(HostAlloc, c);
6564
}
6665
}
6766
std::cout << "Passed" << std::endl;

SYCL/Basic/submit_barrier.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ int main() {
1515
q.submit(
1616
[&](sycl::handler &cgh) { cgh.single_task<class kernel1>([]() {}); });
1717

18-
cl::sycl::event e = q.submit_barrier();
18+
cl::sycl::event e = q.ext_oneapi_submit_barrier();
1919
e.wait_and_throw();
2020

2121
return 0;

SYCL/DiscardEvents/invalid_event.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ void QueueAPIsReturnDiscardedEvent(sycl::queue Q) {
7272
DiscardedEvent.get_info<sycl::info::event::command_execution_status>() ==
7373
sycl::info::event_command_status::ext_oneapi_unknown);
7474

75-
DiscardedEvent = Q.submit_barrier();
75+
DiscardedEvent = Q.ext_oneapi_submit_barrier();
7676
assert(
7777
DiscardedEvent.get_info<sycl::info::event::command_execution_status>() ==
7878
sycl::info::event_command_status::ext_oneapi_unknown);

SYCL/ESIMD/api/functional/value.hpp

Lines changed: 20 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,24 @@ template <typename DataT, int NumElems> std::vector<DataT> generate_ref_data() {
133133

134134
std::vector<DataT> ref_data{};
135135

136-
if constexpr (std::is_signed_v<DataT>) {
136+
if constexpr (type_traits::is_sycl_floating_point_v<DataT>) {
137+
static const DataT nan = value<DataT>::nan();
138+
static const DataT inf = value<DataT>::inf();
139+
140+
ref_data.reserve((NumElems > 1) ? NumElems : 6);
141+
142+
// We are using the `double` literals to avoid precision loss for case of
143+
// the `double` DataT on unexact values like 0.1
144+
ref_data.insert(ref_data.end(), {-inf, nan, min, max, -0.0, 0.1});
145+
if constexpr (NumElems != 1) {
146+
ref_data.insert(ref_data.end(), {-0.1, +0.0});
147+
for (size_t i = ref_data.size(); i < NumElems; ++i) {
148+
// Store values with exact representation of the fraction part for
149+
// every floating point type
150+
ref_data.push_back(i + 0.25);
151+
}
152+
}
153+
} else if constexpr (std::is_signed_v<DataT>) {
137154
ref_data.reserve((NumElems > 1) ? NumElems : 5);
138155

139156
ref_data.insert(ref_data.end(), {min, min_half, max, max_half, 0});
@@ -143,9 +160,8 @@ template <typename DataT, int NumElems> std::vector<DataT> generate_ref_data() {
143160
ref_data.push_back(i);
144161
}
145162
}
146-
}
147-
148-
if constexpr (std::is_unsigned_v<DataT>) {
163+
} else {
164+
// Unsigned integral type
149165
ref_data.reserve((NumElems > 1) ? NumElems : 3);
150166

151167
ref_data.insert(ref_data.end(), {max, max_half, 0});
@@ -156,26 +172,6 @@ template <typename DataT, int NumElems> std::vector<DataT> generate_ref_data() {
156172
}
157173
}
158174
}
159-
160-
if constexpr (type_traits::is_sycl_floating_point_v<DataT>) {
161-
static const DataT nan = value<DataT>::nan();
162-
static const DataT inf = value<DataT>::inf();
163-
164-
ref_data.reserve((NumElems > 1) ? NumElems : 6);
165-
166-
// We are using the `double` literals to avoid precision loss for case of
167-
// the `double` DataT on unexact values like 0.1
168-
ref_data.insert(ref_data.end(), {-inf, nan, min, max, -0.0, 0.1});
169-
if constexpr (NumElems != 1) {
170-
ref_data.insert(ref_data.end(), {-0.1, +0.0});
171-
for (size_t i = ref_data.size(); i < NumElems; ++i) {
172-
// Store values with exact representation of the fraction part for
173-
// every floating point type
174-
ref_data.push_back(i + 0.25);
175-
}
176-
}
177-
}
178-
179175
return ref_data;
180176
}
181177

SYCL/ESIMD/api/simd_copy_to_from.cpp

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -156,13 +156,14 @@ template <typename T> bool testUSM(const std::string &Type, queue &Q) {
156156
Pass &= testUSM<T, 15>(Type, Q);
157157
Pass &= testUSM<T, 16>(Type, Q);
158158

159-
if constexpr (sizeof(T) < 8) {
160-
Pass &= testUSM<T, 24>(Type, Q);
161-
Pass &= testUSM<T, 25>(Type, Q);
159+
Pass &= testUSM<T, 24>(Type, Q);
160+
Pass &= testUSM<T, 25>(Type, Q);
162161

163-
Pass &= testUSM<T, 31>(Type, Q);
164-
Pass &= testUSM<T, 32>(Type, Q);
165-
}
162+
Pass &= testUSM<T, 31>(Type, Q);
163+
Pass &= testUSM<T, 32>(Type, Q);
164+
165+
Pass &= testUSM<T, 91>(Type, Q);
166+
Pass &= testUSM<T, 92>(Type, Q);
166167

167168
return Pass;
168169
}
@@ -209,13 +210,14 @@ template <typename T> bool testAcc(const std::string &Type, queue &Q) {
209210
Pass &= testAcc<T, 15>(Type, Q);
210211
Pass &= testAcc<T, 16>(Type, Q);
211212

212-
if constexpr (sizeof(T) < 8) {
213-
Pass &= testAcc<T, 24>(Type, Q);
214-
Pass &= testAcc<T, 25>(Type, Q);
213+
Pass &= testAcc<T, 24>(Type, Q);
214+
Pass &= testAcc<T, 25>(Type, Q);
215215

216-
Pass &= testAcc<T, 31>(Type, Q);
217-
Pass &= testAcc<T, 32>(Type, Q);
218-
}
216+
Pass &= testAcc<T, 31>(Type, Q);
217+
Pass &= testAcc<T, 32>(Type, Q);
218+
219+
Pass &= testAcc<T, 91>(Type, Q);
220+
Pass &= testAcc<T, 92>(Type, Q);
219221

220222
return Pass;
221223
}

0 commit comments

Comments
 (0)