Skip to content

Commit 7193c26

Browse files
[ABI-Break][SYCL] Remove collectives in the sub-group class (#13665)
Re-lands #13199 and reverts #13464.
1 parent b429484 commit 7193c26

File tree

1 file changed

+0
-119
lines changed

1 file changed

+0
-119
lines changed

sycl/include/sycl/sub_group.hpp

Lines changed: 0 additions & 119 deletions
Original file line numberDiff line numberDiff line change
@@ -643,125 +643,6 @@ struct sub_group {
643643
#endif
644644
}
645645

646-
#ifndef __INTEL_PREVIEW_BREAKING_CHANGES__
647-
/* --- deprecated collective functions --- */
648-
template <typename T>
649-
__SYCL_DEPRECATED("Collectives in the sub-group class are deprecated. Use "
650-
"sycl::ext::oneapi::broadcast instead.")
651-
EnableIfIsScalarArithmetic<T> broadcast(T x, id<1> local_id) const {
652-
#ifdef __SYCL_DEVICE_ONLY__
653-
return sycl::detail::spirv::GroupBroadcast<sub_group>(x, local_id);
654-
#else
655-
(void)x;
656-
(void)local_id;
657-
throw sycl::exception(make_error_code(errc::feature_not_supported),
658-
"Sub-groups are not supported on host.");
659-
#endif
660-
}
661-
662-
template <typename T, class BinaryOperation>
663-
__SYCL_DEPRECATED("Collectives in the sub-group class are deprecated. Use "
664-
"sycl::ext::oneapi::reduce instead.")
665-
EnableIfIsScalarArithmetic<T> reduce(T x, BinaryOperation op) const {
666-
#ifdef __SYCL_DEVICE_ONLY__
667-
return sycl::detail::calc<__spv::GroupOperation::Reduce>(
668-
typename sycl::detail::GroupOpTag<T>::type(), *this, x, op);
669-
#else
670-
(void)x;
671-
(void)op;
672-
throw sycl::exception(make_error_code(errc::feature_not_supported),
673-
"Sub-groups are not supported on host.");
674-
#endif
675-
}
676-
677-
template <typename T, class BinaryOperation>
678-
__SYCL_DEPRECATED("Collectives in the sub-group class are deprecated. Use "
679-
"sycl::ext::oneapi::reduce instead.")
680-
EnableIfIsScalarArithmetic<T> reduce(T x, T init, BinaryOperation op) const {
681-
#ifdef __SYCL_DEVICE_ONLY__
682-
return op(init, reduce(x, op));
683-
#else
684-
(void)x;
685-
(void)init;
686-
(void)op;
687-
throw sycl::exception(make_error_code(errc::feature_not_supported),
688-
"Sub-groups are not supported on host.");
689-
#endif
690-
}
691-
692-
template <typename T, class BinaryOperation>
693-
__SYCL_DEPRECATED("Collectives in the sub-group class are deprecated. Use "
694-
"sycl::ext::oneapi::exclusive_scan instead.")
695-
EnableIfIsScalarArithmetic<T> exclusive_scan(T x, BinaryOperation op) const {
696-
#ifdef __SYCL_DEVICE_ONLY__
697-
return sycl::detail::calc<__spv::GroupOperation::ExclusiveScan>(
698-
typename sycl::detail::GroupOpTag<T>::type(), *this, x, op);
699-
#else
700-
(void)x;
701-
(void)op;
702-
throw sycl::exception(make_error_code(errc::feature_not_supported),
703-
"Sub-groups are not supported on host.");
704-
#endif
705-
}
706-
707-
template <typename T, class BinaryOperation>
708-
__SYCL_DEPRECATED("Collectives in the sub-group class are deprecated. Use "
709-
"sycl::ext::oneapi::exclusive_scan instead.")
710-
EnableIfIsScalarArithmetic<T> exclusive_scan(T x, T init,
711-
BinaryOperation op) const {
712-
#ifdef __SYCL_DEVICE_ONLY__
713-
if (get_local_id().get(0) == 0) {
714-
x = op(init, x);
715-
}
716-
T scan = exclusive_scan(x, op);
717-
if (get_local_id().get(0) == 0) {
718-
scan = init;
719-
}
720-
return scan;
721-
#else
722-
(void)x;
723-
(void)init;
724-
(void)op;
725-
throw sycl::exception(make_error_code(errc::feature_not_supported),
726-
"Sub-groups are not supported on host.");
727-
#endif
728-
}
729-
730-
template <typename T, class BinaryOperation>
731-
__SYCL_DEPRECATED("Collectives in the sub-group class are deprecated. Use "
732-
"sycl::ext::oneapi::inclusive_scan instead.")
733-
EnableIfIsScalarArithmetic<T> inclusive_scan(T x, BinaryOperation op) const {
734-
#ifdef __SYCL_DEVICE_ONLY__
735-
return sycl::detail::calc<__spv::GroupOperation::InclusiveScan>(
736-
typename sycl::detail::GroupOpTag<T>::type(), *this, x, op);
737-
#else
738-
(void)x;
739-
(void)op;
740-
throw sycl::exception(make_error_code(errc::feature_not_supported),
741-
"Sub-groups are not supported on host.");
742-
#endif
743-
}
744-
745-
template <typename T, class BinaryOperation>
746-
__SYCL_DEPRECATED("Collectives in the sub-group class are deprecated. Use "
747-
"sycl::ext::oneapi::inclusive_scan instead.")
748-
EnableIfIsScalarArithmetic<T> inclusive_scan(T x, BinaryOperation op,
749-
T init) const {
750-
#ifdef __SYCL_DEVICE_ONLY__
751-
if (get_local_id().get(0) == 0) {
752-
x = op(init, x);
753-
}
754-
return inclusive_scan(x, op);
755-
#else
756-
(void)x;
757-
(void)op;
758-
(void)init;
759-
throw sycl::exception(make_error_code(errc::feature_not_supported),
760-
"Sub-groups are not supported on host.");
761-
#endif
762-
}
763-
#endif // __INTEL_PREVIEW_BREAKING_CHANGES__
764-
765646
linear_id_type get_group_linear_range() const {
766647
#ifdef __SYCL_DEVICE_ONLY__
767648
return static_cast<linear_id_type>(get_group_range()[0]);

0 commit comments

Comments
 (0)