Skip to content

Commit 2bd1945

Browse files
Address code review comments
1 parent 072f753 commit 2bd1945

13 files changed

+29
-59
lines changed

sycl/include/sycl/device_aspect_macros.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -624,6 +624,6 @@
624624
#endif
625625

626626
#ifndef __SYCL_ANY_DEVICE_HAS_ext_intel_fpga_task_sequence__
627-
// __SYCL_ASPECT(ext_oneapi_tangle_group, 61)
627+
// __SYCL_ASPECT(ext_intel_fpga_task_sequence__, 61)
628628
#define __SYCL_ANY_DEVICE_HAS_ext_intel_fpga_task_sequence__ 0
629629
#endif

sycl/include/sycl/ext/intel/experimental/fpga_kernel_properties.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -108,11 +108,11 @@ inline constexpr fpga_cluster_key::value_t<option> fpga_cluster;
108108

109109
inline constexpr fpga_cluster_key::value_t<
110110
fpga_cluster_options_enum::stall_free>
111-
use_stall_free_clusters;
111+
stall_free_clusters;
112112

113113
inline constexpr fpga_cluster_key::value_t<
114114
fpga_cluster_options_enum::stall_enable>
115-
use_stall_enable_clusters;
115+
stall_enable_clusters;
116116

117117
} // namespace ext::intel::experimental
118118

sycl/include/sycl/ext/intel/experimental/task_sequence.hpp

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
/* INTEL_CUSTOMIZATION */
21
//==--------------------------- task_sequence.hpp --------------------------==//
32
//
43
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
@@ -60,17 +59,17 @@ class task_sequence<
6059
&f, pipelined, fpga_cluster, response_capacity, invocation_capacity);
6160
#else
6261
throw exception{make_error_code(errc::feature_not_supported),
63-
"task_sequence is not supported on host device"};
62+
"task_sequence is not supported on the host"};
6463
#endif
6564
}
6665

67-
void async(ArgsT... Args) {
66+
void async([[maybe_unused]] ArgsT... Args) {
6867
#if defined(__SYCL_DEVICE_ONLY__)
6968
++outstanding;
7069
__spirv_TaskSequenceAsyncINTEL(taskSequence, Args...);
7170
#else
7271
throw exception{make_error_code(errc::feature_not_supported),
73-
"task_sequence is not supported on host device"};
72+
"task_sequence is not supported on the host"};
7473
#endif
7574
}
7675

@@ -80,7 +79,7 @@ class task_sequence<
8079
return __spirv_TaskSequenceGetINTEL<ReturnT>(taskSequence);
8180
#else
8281
throw exception{make_error_code(errc::feature_not_supported),
83-
"task_sequence is not supported on host device"};
82+
"task_sequence is not supported on the host"};
8483
#endif
8584
}
8685

@@ -91,11 +90,8 @@ class task_sequence<
9190
get();
9291
}
9392
__spirv_TaskSequenceReleaseINTEL(taskSequence);
94-
#else
95-
// throw exception{make_error_code(errc::feature_not_supported),
96-
// "task_sequence is not supported on host device"};
97-
// Destructor shouldn't throw exception.
9893
#endif
94+
// Destructor shouldn't throw exception.
9995
}
10096

10197
template <typename propertyT> static constexpr bool has_property() {

sycl/include/sycl/ext/intel/experimental/task_sequence_properties.hpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
/* INTEL_CUSTOMIZATION */
21
//==-- task_sequence_properties.hpp - Specific properties of task_sequence -==//
32
//
43
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.

sycl/test-e2e/TaskSequence/concurrent-loops.cpp

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -89,9 +89,6 @@ int main() {
8989
q.wait();
9090
}
9191

92-
if (abs(out[0] - golden) < 0.001)
93-
std::cout << "PASSED\n";
94-
else
95-
std::cout << "FAILED\n";
92+
assert(abs(out[0] - golden) < 0.001);
9693
return 0;
9794
}

sycl/test-e2e/TaskSequence/in-order-async-get.cpp

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -61,14 +61,9 @@ int main() {
6161
}
6262

6363
// verification
64-
bool passed = true;
6564
for (int i = 0; i < kNumInputs; ++i) {
66-
if (abs(results[i] - golden[i]) > 0.0001)
67-
passed = false;
65+
assert(abs(results[i] - golden[i]) < 0.001);
6866
}
69-
if (passed)
70-
std::cout << "PASSED\n";
71-
else
72-
std::cout << "FAILED\n";
67+
7368
return 0;
7469
}

sycl/test-e2e/TaskSequence/mult-and-add.cpp

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,5 @@ int main() {
3737
});
3838
myQueue.wait();
3939

40-
// Check result:
41-
if (result == 1 * 2 + 3 * 4)
42-
std::cout << "PASSED\n";
43-
else
44-
std::cout << "FAILED\n";
40+
assert(result == (1 * 2 + 3 * 4));
4541
}

sycl/test-e2e/TaskSequence/multi-kernel-task-function-reuse.cpp

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -74,13 +74,7 @@ int main() {
7474
q.wait();
7575
}
7676

77-
if (out[0] == golden)
78-
std::cout << "PASSED sequential test" << std::endl;
79-
else
80-
std::cout << "FAILED" << std::endl;
81-
82-
if (out[1] == golden)
83-
std::cout << "PASSED parallel test" << std::endl;
84-
else
85-
std::cout << "FAILED" << std::endl;
77+
assert(out[0] == golden);
78+
assert(out[1] == golden);
79+
return 0;
8680
}

sycl/test-e2e/TaskSequence/producer-consumer.cpp

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -56,11 +56,6 @@ int main() {
5656
int sum = 0;
5757
for (int i = 0; i < kSize; ++i)
5858
sum += i * i + 42;
59-
if (result == sum) {
60-
std::cout << "PASSED\n";
61-
return 0;
62-
} else {
63-
std::cout << "FAILED\n";
64-
return 1;
65-
}
59+
assert(result == sum);
60+
return 0;
6661
}

sycl/test-e2e/TaskSequence/struct-array-args-and-return.cpp

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -168,8 +168,6 @@ int main() {
168168
});
169169
q.wait();
170170
}
171-
bool passed = check(res_struct) && check(res_array);
172-
std::cout << (passed ? "PASSED\n" : "FAILED\n");
173-
171+
assert(check(res_struct) && check(res_array));
174172
return 0;
175173
}

sycl/test/check_device_code/task_sequence_intel_no_explicit_get.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ int main() {
2828
cgh.single_task([=]() {
2929
int d1[kSize], d2[kSize];
3030
task_sequence<arrayAdd,
31-
decltype(properties{pipelined<0>, use_stall_enable_clusters,
31+
decltype(properties{pipelined<0>, stall_enable_clusters,
3232
invocation_capacity<1>,
3333
response_capacity<1>})>
3434
arrayAddTask;

sycl/test/extensions/properties/properties_kernel_fpga.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -81,12 +81,12 @@ int main() {
8181
intel::experimental::register_map_interface_options_enum::
8282
do_not_wait_for_done_write>)>);
8383
static_assert(
84-
std::is_same_v<decltype(intel::experimental::use_stall_enable_clusters),
84+
std::is_same_v<decltype(intel::experimental::stall_enable_clusters),
8585
decltype(intel::experimental::fpga_cluster<
8686
intel::experimental::fpga_cluster_options_enum::
8787
stall_enable>)>);
8888
static_assert(
89-
std::is_same_v<decltype(intel::experimental::use_stall_free_clusters),
89+
std::is_same_v<decltype(intel::experimental::stall_free_clusters),
9090
decltype(intel::experimental::fpga_cluster<
9191
intel::experimental::fpga_cluster_options_enum::
9292
stall_free>)>);
@@ -95,7 +95,7 @@ int main() {
9595
using PS = decltype(oneapi::experimental::properties(
9696
intel::experimental::streaming_interface_remove_downstream_stall,
9797
intel::experimental::pipelined<1>,
98-
intel::experimental::use_stall_enable_clusters));
98+
intel::experimental::stall_enable_clusters));
9999
static_assert(oneapi::experimental::is_property_list_v<PS>);
100100
static_assert(
101101
PS::has_property<intel::experimental::streaming_interface_key>());
@@ -116,7 +116,7 @@ int main() {
116116
using PR = decltype(oneapi::experimental::properties(
117117
intel::experimental::register_map_interface_wait_for_done_write,
118118
intel::experimental::pipelined<0>,
119-
intel::experimental::use_stall_free_clusters));
119+
intel::experimental::stall_free_clusters));
120120
static_assert(oneapi::experimental::is_property_list_v<PR>);
121121
static_assert(
122122
PR::has_property<intel::experimental::register_map_interface_key>());

sycl/test/extensions/task_sequence/task_sequence_properties.cpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,11 @@ void dummyTask() {}
1212
static task_sequence<dummyTask,
1313
decltype(properties(balanced, response_capacity<0>,
1414
invocation_capacity<0>, pipelined<-1>,
15-
use_stall_free_clusters))>
15+
stall_free_clusters))>
1616
TaskSequence1;
1717
static task_sequence<
1818
dummyTask, decltype(properties(response_capacity<2>, invocation_capacity<3>,
19-
pipelined<1>, use_stall_enable_clusters))>
19+
pipelined<1>, stall_enable_clusters))>
2020
TaskSequence2;
2121
static task_sequence<dummyTask, decltype(properties(pipelined<0>))>
2222
TaskSequence3;
@@ -52,8 +52,8 @@ int main() {
5252
static_assert(is_property_value<decltype(pipelined<-1>)>::value);
5353
static_assert(is_property_value<decltype(pipelined<0>)>::value);
5454
static_assert(is_property_value<decltype(pipelined<1>)>::value);
55-
static_assert(is_property_value<decltype(use_stall_enable_clusters)>::value);
56-
static_assert(is_property_value<decltype(use_stall_free_clusters)>::value);
55+
static_assert(is_property_value<decltype(stall_enable_clusters)>::value);
56+
static_assert(is_property_value<decltype(stall_free_clusters)>::value);
5757

5858
checkIsPropertyOf<decltype(TaskSequence1)>();
5959
static_assert(TaskSequence1.has_property<balanced_key>());
@@ -68,7 +68,7 @@ int main() {
6868
invocation_capacity<0>);
6969
static_assert(TaskSequence1.get_property<pipelined_key>() == pipelined<-1>);
7070
static_assert(TaskSequence1.get_property<fpga_cluster_key>() ==
71-
use_stall_free_clusters);
71+
stall_free_clusters);
7272

7373
checkIsPropertyOf<decltype(TaskSequence2)>();
7474
static_assert(!TaskSequence2.has_property<balanced_key>());
@@ -82,7 +82,7 @@ int main() {
8282
invocation_capacity<3>);
8383
static_assert(TaskSequence2.get_property<pipelined_key>() == pipelined<1>);
8484
static_assert(TaskSequence2.get_property<fpga_cluster_key>() ==
85-
use_stall_enable_clusters);
85+
stall_enable_clusters);
8686

8787
checkIsPropertyOf<decltype(TaskSequence3)>();
8888
static_assert(!TaskSequence3.has_property<balanced_key>());

0 commit comments

Comments
 (0)