Skip to content

Commit 346f791

Browse files
[SYCL][NFC] Remove some mentions of host device. (#8466)
Host device doesn't exists anymore in the implementation, replaced "host device" with just "host".
1 parent f4185c7 commit 346f791

File tree

6 files changed

+38
-42
lines changed

6 files changed

+38
-42
lines changed

sycl/include/sycl/group.hpp

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -127,12 +127,8 @@ template <int Dimensions = 1> class __SYCL_TYPE(group) group {
127127
#ifdef __SYCL_DEVICE_ONLY__
128128
return __spirv::initLocalInvocationId<Dimensions, id<Dimensions>>();
129129
#else
130-
throw runtime_error("get_local_id() is not implemented on host device",
130+
throw runtime_error("get_local_id() is not implemented on host",
131131
PI_ERROR_INVALID_DEVICE);
132-
// Implementing get_local_id() on host device requires ABI breaking change.
133-
// It requires extending class group with local item which represents
134-
// local_id. Currently this local id is only used in nd_item and group
135-
// cannot access it.
136132
#endif
137133
}
138134

@@ -545,7 +541,7 @@ group<Dims> this_group() {
545541
#else
546542
throw sycl::exception(
547543
sycl::make_error_code(sycl::errc::feature_not_supported),
548-
"Free function calls are not supported on host device");
544+
"Free function calls are not supported on host");
549545
#endif
550546
}
551547

@@ -557,7 +553,7 @@ template <int Dims> group<Dims> this_group() {
557553
#else
558554
throw sycl::exception(
559555
sycl::make_error_code(sycl::errc::feature_not_supported),
560-
"Free function calls are not supported on host device");
556+
"Free function calls are not supported on host");
561557
#endif
562558
}
563559
} // namespace ext::oneapi::experimental

sycl/include/sycl/group_algorithm.hpp

Lines changed: 28 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ Function for_each(Group g, Ptr first, Ptr last, Function f) {
159159
(void)first;
160160
(void)last;
161161
(void)f;
162-
throw runtime_error("Group algorithms are not supported on host device.",
162+
throw runtime_error("Group algorithms are not supported on host.",
163163
PI_ERROR_INVALID_DEVICE);
164164
#endif
165165
}
@@ -186,7 +186,7 @@ reduce_over_group(Group, T x, BinaryOperation binary_op) {
186186
sycl::detail::spirv::group_scope<Group>::value>(
187187
typename sycl::detail::GroupOpTag<T>::type(), x, binary_op);
188188
#else
189-
throw runtime_error("Group algorithms are not supported on host device.",
189+
throw runtime_error("Group algorithms are not supported on host.",
190190
PI_ERROR_INVALID_DEVICE);
191191
#endif
192192
}
@@ -209,7 +209,7 @@ reduce_over_group(Group g, T x, BinaryOperation binary_op) {
209209
(void)g;
210210
(void)x;
211211
(void)binary_op;
212-
throw runtime_error("Group algorithms are not supported on host device.",
212+
throw runtime_error("Group algorithms are not supported on host.",
213213
PI_ERROR_INVALID_DEVICE);
214214
#endif
215215
}
@@ -258,7 +258,7 @@ reduce_over_group(Group g, V x, T init, BinaryOperation binary_op) {
258258
return binary_op(init, reduce_over_group(g, x, binary_op));
259259
#else
260260
(void)g;
261-
throw runtime_error("Group algorithms are not supported on host device.",
261+
throw runtime_error("Group algorithms are not supported on host.",
262262
PI_ERROR_INVALID_DEVICE);
263263
#endif
264264
}
@@ -286,7 +286,7 @@ reduce_over_group(Group g, V x, T init, BinaryOperation binary_op) {
286286
return result;
287287
#else
288288
(void)g;
289-
throw runtime_error("Group algorithms are not supported on host device.",
289+
throw runtime_error("Group algorithms are not supported on host.",
290290
PI_ERROR_INVALID_DEVICE);
291291
#endif
292292
}
@@ -310,7 +310,7 @@ joint_reduce(Group g, Ptr first, Ptr last, BinaryOperation binary_op) {
310310
(void)first;
311311
(void)last;
312312
(void)binary_op;
313-
throw runtime_error("Group algorithms are not supported on host device.",
313+
throw runtime_error("Group algorithms are not supported on host.",
314314
PI_ERROR_INVALID_DEVICE);
315315
#endif
316316
}
@@ -345,7 +345,7 @@ joint_reduce(Group g, Ptr first, Ptr last, T init, BinaryOperation binary_op) {
345345
#else
346346
(void)g;
347347
(void)last;
348-
throw runtime_error("Group algorithms are not supported on host device.",
348+
throw runtime_error("Group algorithms are not supported on host.",
349349
PI_ERROR_INVALID_DEVICE);
350350
#endif
351351
}
@@ -358,7 +358,7 @@ any_of_group(Group, bool pred) {
358358
return sycl::detail::spirv::GroupAny<Group>(pred);
359359
#else
360360
(void)pred;
361-
throw runtime_error("Group algorithms are not supported on host device.",
361+
throw runtime_error("Group algorithms are not supported on host.",
362362
PI_ERROR_INVALID_DEVICE);
363363
#endif
364364
}
@@ -384,7 +384,7 @@ joint_any_of(Group g, Ptr first, Ptr last, Predicate pred) {
384384
(void)first;
385385
(void)last;
386386
(void)pred;
387-
throw runtime_error("Group algorithms are not supported on host device.",
387+
throw runtime_error("Group algorithms are not supported on host.",
388388
PI_ERROR_INVALID_DEVICE);
389389
#endif
390390
}
@@ -397,7 +397,7 @@ all_of_group(Group, bool pred) {
397397
return sycl::detail::spirv::GroupAll<Group>(pred);
398398
#else
399399
(void)pred;
400-
throw runtime_error("Group algorithms are not supported on host device.",
400+
throw runtime_error("Group algorithms are not supported on host.",
401401
PI_ERROR_INVALID_DEVICE);
402402
#endif
403403
}
@@ -423,7 +423,7 @@ joint_all_of(Group g, Ptr first, Ptr last, Predicate pred) {
423423
(void)first;
424424
(void)last;
425425
(void)pred;
426-
throw runtime_error("Group algorithms are not supported on host device.",
426+
throw runtime_error("Group algorithms are not supported on host.",
427427
PI_ERROR_INVALID_DEVICE);
428428
#endif
429429
}
@@ -436,7 +436,7 @@ none_of_group(Group, bool pred) {
436436
return sycl::detail::spirv::GroupAll<Group>(!pred);
437437
#else
438438
(void)pred;
439-
throw runtime_error("Group algorithms are not supported on host device.",
439+
throw runtime_error("Group algorithms are not supported on host.",
440440
PI_ERROR_INVALID_DEVICE);
441441
#endif
442442
}
@@ -459,7 +459,7 @@ joint_none_of(Group g, Ptr first, Ptr last, Predicate pred) {
459459
(void)first;
460460
(void)last;
461461
(void)pred;
462-
throw runtime_error("Group algorithms are not supported on host device.",
462+
throw runtime_error("Group algorithms are not supported on host.",
463463
PI_ERROR_INVALID_DEVICE);
464464
#endif
465465
}
@@ -478,7 +478,7 @@ shift_group_left(Group, T x, typename Group::linear_id_type delta = 1) {
478478
#else
479479
(void)x;
480480
(void)delta;
481-
throw runtime_error("Sub-groups are not supported on host device.",
481+
throw runtime_error("Sub-groups are not supported on host.",
482482
PI_ERROR_INVALID_DEVICE);
483483
#endif
484484
}
@@ -497,7 +497,7 @@ shift_group_right(Group, T x, typename Group::linear_id_type delta = 1) {
497497
#else
498498
(void)x;
499499
(void)delta;
500-
throw runtime_error("Sub-groups are not supported on host device.",
500+
throw runtime_error("Sub-groups are not supported on host.",
501501
PI_ERROR_INVALID_DEVICE);
502502
#endif
503503
}
@@ -516,7 +516,7 @@ permute_group_by_xor(Group, T x, typename Group::linear_id_type mask) {
516516
#else
517517
(void)x;
518518
(void)mask;
519-
throw runtime_error("Sub-groups are not supported on host device.",
519+
throw runtime_error("Sub-groups are not supported on host.",
520520
PI_ERROR_INVALID_DEVICE);
521521
#endif
522522
}
@@ -535,7 +535,7 @@ select_from_group(Group, T x, typename Group::id_type local_id) {
535535
#else
536536
(void)x;
537537
(void)local_id;
538-
throw runtime_error("Sub-groups are not supported on host device.",
538+
throw runtime_error("Sub-groups are not supported on host.",
539539
PI_ERROR_INVALID_DEVICE);
540540
#endif
541541
}
@@ -554,7 +554,7 @@ group_broadcast(Group, T x, typename Group::id_type local_id) {
554554
#else
555555
(void)x;
556556
(void)local_id;
557-
throw runtime_error("Group algorithms are not supported on host device.",
557+
throw runtime_error("Group algorithms are not supported on host.",
558558
PI_ERROR_INVALID_DEVICE);
559559
#endif
560560
}
@@ -573,7 +573,7 @@ group_broadcast(Group g, T x, typename Group::linear_id_type linear_local_id) {
573573
(void)g;
574574
(void)x;
575575
(void)linear_local_id;
576-
throw runtime_error("Group algorithms are not supported on host device.",
576+
throw runtime_error("Group algorithms are not supported on host.",
577577
PI_ERROR_INVALID_DEVICE);
578578
#endif
579579
}
@@ -589,7 +589,7 @@ group_broadcast(Group g, T x) {
589589
#else
590590
(void)g;
591591
(void)x;
592-
throw runtime_error("Group algorithms are not supported on host device.",
592+
throw runtime_error("Group algorithms are not supported on host.",
593593
PI_ERROR_INVALID_DEVICE);
594594
#endif
595595
}
@@ -614,7 +614,7 @@ exclusive_scan_over_group(Group, T x, BinaryOperation binary_op) {
614614
sycl::detail::spirv::group_scope<Group>::value>(
615615
typename sycl::detail::GroupOpTag<T>::type(), x, binary_op);
616616
#else
617-
throw runtime_error("Group algorithms are not supported on host device.",
617+
throw runtime_error("Group algorithms are not supported on host.",
618618
PI_ERROR_INVALID_DEVICE);
619619
#endif
620620
}
@@ -637,7 +637,7 @@ exclusive_scan_over_group(Group g, T x, BinaryOperation binary_op) {
637637
(void)g;
638638
(void)x;
639639
(void)binary_op;
640-
throw runtime_error("Group algorithms are not supported on host device.",
640+
throw runtime_error("Group algorithms are not supported on host.",
641641
PI_ERROR_INVALID_DEVICE);
642642
#endif
643643
}
@@ -715,7 +715,7 @@ exclusive_scan_over_group(Group g, V x, T init, BinaryOperation binary_op) {
715715
return scan;
716716
#else
717717
(void)g;
718-
throw runtime_error("Group algorithms are not supported on host device.",
718+
throw runtime_error("Group algorithms are not supported on host.",
719719
PI_ERROR_INVALID_DEVICE);
720720
#endif
721721
}
@@ -773,7 +773,7 @@ joint_exclusive_scan(Group g, InPtr first, InPtr last, OutPtr result, T init,
773773
(void)last;
774774
(void)result;
775775
(void)init;
776-
throw runtime_error("Group algorithms are not supported on host device.",
776+
throw runtime_error("Group algorithms are not supported on host.",
777777
PI_ERROR_INVALID_DEVICE);
778778
#endif
779779
}
@@ -845,7 +845,7 @@ inclusive_scan_over_group(Group, T x, BinaryOperation binary_op) {
845845
sycl::detail::spirv::group_scope<Group>::value>(
846846
typename sycl::detail::GroupOpTag<T>::type(), x, binary_op);
847847
#else
848-
throw runtime_error("Group algorithms are not supported on host device.",
848+
throw runtime_error("Group algorithms are not supported on host.",
849849
PI_ERROR_INVALID_DEVICE);
850850
#endif
851851
}
@@ -867,7 +867,7 @@ inclusive_scan_over_group(Group g, T x, BinaryOperation binary_op) {
867867
(void)g;
868868
(void)x;
869869
(void)binary_op;
870-
throw runtime_error("Group algorithms are not supported on host device.",
870+
throw runtime_error("Group algorithms are not supported on host.",
871871
PI_ERROR_INVALID_DEVICE);
872872
#endif
873873
}
@@ -897,7 +897,7 @@ inclusive_scan_over_group(Group g, V x, BinaryOperation binary_op, T init) {
897897
return inclusive_scan_over_group(g, x, binary_op);
898898
#else
899899
(void)g;
900-
throw runtime_error("Group algorithms are not supported on host device.",
900+
throw runtime_error("Group algorithms are not supported on host.",
901901
PI_ERROR_INVALID_DEVICE);
902902
#endif
903903
}
@@ -975,7 +975,7 @@ joint_inclusive_scan(Group g, InPtr first, InPtr last, OutPtr result,
975975
(void)g;
976976
(void)last;
977977
(void)result;
978-
throw runtime_error("Group algorithms are not supported on host device.",
978+
throw runtime_error("Group algorithms are not supported on host.",
979979
PI_ERROR_INVALID_DEVICE);
980980
#endif
981981
}

sycl/include/sycl/id.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -356,7 +356,7 @@ id<Dims> this_id() {
356356
#else
357357
throw sycl::exception(
358358
sycl::make_error_code(sycl::errc::feature_not_supported),
359-
"Free function calls are not supported on host device");
359+
"Free function calls are not supported on host");
360360
#endif
361361
}
362362

@@ -367,7 +367,7 @@ template <int Dims> id<Dims> this_id() {
367367
#else
368368
throw sycl::exception(
369369
sycl::make_error_code(sycl::errc::feature_not_supported),
370-
"Free function calls are not supported on host device");
370+
"Free function calls are not supported on host");
371371
#endif
372372
}
373373
} // namespace ext::oneapi::experimental

sycl/include/sycl/item.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ item<Dims> this_item() {
148148
#else
149149
throw sycl::exception(
150150
sycl::make_error_code(sycl::errc::feature_not_supported),
151-
"Free function calls are not supported on host device");
151+
"Free function calls are not supported on host");
152152
#endif
153153
}
154154

@@ -159,7 +159,7 @@ template <int Dims> item<Dims> this_item() {
159159
#else
160160
throw sycl::exception(
161161
sycl::make_error_code(sycl::errc::feature_not_supported),
162-
"Free function calls are not supported on host device");
162+
"Free function calls are not supported on host");
163163
#endif
164164
}
165165
} // namespace ext::oneapi::experimental

sycl/include/sycl/nd_item.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,7 @@ nd_item<Dims> this_nd_item() {
198198
#else
199199
throw sycl::exception(
200200
sycl::make_error_code(sycl::errc::feature_not_supported),
201-
"Free function calls are not supported on host device");
201+
"Free function calls are not supported on host");
202202
#endif
203203
}
204204

@@ -210,7 +210,7 @@ template <int Dims> nd_item<Dims> this_nd_item() {
210210
#else
211211
throw sycl::exception(
212212
sycl::make_error_code(sycl::errc::feature_not_supported),
213-
"Free function calls are not supported on host device");
213+
"Free function calls are not supported on host");
214214
#endif
215215
}
216216
} // namespace ext::oneapi::experimental

sycl/include/sycl/sub_group.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ inline sub_group this_sub_group() {
2222
#ifdef __SYCL_DEVICE_ONLY__
2323
return sub_group();
2424
#else
25-
throw runtime_error("Sub-groups are not supported on host device.",
25+
throw runtime_error("Sub-groups are not supported on host.",
2626
PI_ERROR_INVALID_DEVICE);
2727
#endif
2828
}

0 commit comments

Comments
 (0)