Skip to content

Commit 49bda6d

Browse files
committed
Address PR comments
1 parent 7cd58a6 commit 49bda6d

File tree

1 file changed

+9
-10
lines changed

1 file changed

+9
-10
lines changed

ggml/src/ggml-sycl/dpct/helper.hpp

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,8 @@
1414
#define GGML_SYCL_DPCT_HELPER_HPP
1515

1616
#include <map>
17-
#include <sycl/ext/oneapi/experimental/enqueue_functions.hpp>
18-
#include <sycl/half_type.hpp>
1917
#include <sycl/sycl.hpp>
18+
#include <sycl/half_type.hpp>
2019
#include <syclcompat/math.hpp>
2120

2221
#ifdef GGML_SYCL_USE_INTEL_ONEMKL
@@ -119,32 +118,32 @@ inline auto get_onemath_backend(sycl::queue& queue)
119118
#endif
120119
}
121120

122-
template <int NR = 3, typename L>
123-
__dpct_inline__ auto sycl_parallel_for(sycl::handler & cgh, sycl::nd_range<NR> nd_range, L && func) {
121+
template <int NR, typename Func>
122+
__dpct_inline__ void sycl_parallel_for(sycl::handler & cgh, sycl::nd_range<NR> nd_range, Func && func) {
124123
#ifdef SYCL_EXT_ONEAPI_ENQUEUE_FUNCTIONS
125124
namespace syclex = sycl::ext::oneapi::experimental;
126125
syclex::nd_launch(cgh, nd_range, func);
127126
#else
128-
return cgh.parallel_for(nd_range, func);
127+
cgh.parallel_for(nd_range, func);
129128
#endif
130129
}
131130

132-
template <int NR = 3, typename L>
133-
__dpct_inline__ auto sycl_parallel_for(sycl::queue * q, sycl::nd_range<NR> nd_range, L && func) {
131+
template <int NR, typename Func>
132+
__dpct_inline__ void sycl_parallel_for(sycl::queue * q, sycl::nd_range<NR> nd_range, Func && func) {
134133
#ifdef SYCL_EXT_ONEAPI_ENQUEUE_FUNCTIONS
135134
namespace syclex = sycl::ext::oneapi::experimental;
136135
syclex::nd_launch(*q, nd_range, func);
137136
#else
138-
return q->parallel_for(nd_range, func);
137+
q->parallel_for(nd_range, func);
139138
#endif
140139
}
141140

142-
template <typename L> __dpct_inline__ auto sycl_launch(sycl::queue * stream, L && func) {
141+
template <typename Func> __dpct_inline__ void sycl_launch(sycl::queue * stream, Func && func) {
143142
#ifdef SYCL_EXT_ONEAPI_ENQUEUE_FUNCTIONS
144143
namespace syclex = sycl::ext::oneapi::experimental;
145144
syclex::submit(*stream, func);
146145
#else
147-
return stream->submit(func);
146+
stream->submit(func);
148147
#endif
149148
}
150149

0 commit comments

Comments
 (0)