Skip to content

Commit 3b867c2

Browse files
committed
Temp - Remove the no-handler macro
1 parent 2ed4cb7 commit 3b867c2

File tree

4 files changed

+6
-22
lines changed

4 files changed

+6
-22
lines changed

sycl/include/sycl/ext/oneapi/experimental/enqueue_functions.hpp

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -259,7 +259,6 @@ template <typename KernelName = sycl::detail::auto_name, int Dimensions,
259259
typename KernelType, typename... ReductionsT>
260260
void nd_launch(queue Q, nd_range<Dimensions> Range, const KernelType &KernelObj,
261261
ReductionsT &&...Reductions) {
262-
#ifdef __DPCPP_ENABLE_UNFINISHED_NO_CGH_SUBMIT
263262
// TODO The handler-less path does not support reductions and kernel function
264263
// properties yet.
265264
if constexpr (sizeof...(ReductionsT) == 0 &&
@@ -268,9 +267,7 @@ void nd_launch(queue Q, nd_range<Dimensions> Range, const KernelType &KernelObj,
268267
const KernelType &>::value)) {
269268
detail::submit_kernel_direct<KernelName>(std::move(Q), empty_properties_t{},
270269
Range, KernelObj);
271-
} else
272-
#endif
273-
{
270+
} else {
274271
submit(std::move(Q), [&](handler &CGH) {
275272
nd_launch<KernelName>(CGH, Range, KernelObj,
276273
std::forward<ReductionsT>(Reductions)...);

sycl/include/sycl/khr/free_function_commands.hpp

Lines changed: 3 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -157,17 +157,14 @@ template <typename KernelType, typename = typename std::enable_if_t<
157157
void launch_grouped(const queue &q, range<1> r, range<1> size, KernelType &&k,
158158
const sycl::detail::code_location &codeLoc =
159159
sycl::detail::code_location::current()) {
160-
#ifdef __DPCPP_ENABLE_UNFINISHED_NO_CGH_SUBMIT
161160
// TODO The handler-less path does not support kernel function properties yet.
162161
if constexpr (!(ext::oneapi::experimental::detail::
163162
HasKernelPropertiesGetMethod<
164163
const KernelType &>::value)) {
165164
detail::submit_kernel_direct(
166165
q, ext::oneapi::experimental::empty_properties_t{},
167166
nd_range<1>(r, size), std::forward<KernelType>(k));
168-
} else
169-
#endif
170-
{
167+
} else {
171168
submit(
172169
q, [&](handler &h) { launch_grouped<KernelType>(h, r, size, k); },
173170
codeLoc);
@@ -178,17 +175,14 @@ template <typename KernelType, typename = typename std::enable_if_t<
178175
void launch_grouped(const queue &q, range<2> r, range<2> size, KernelType &&k,
179176
const sycl::detail::code_location &codeLoc =
180177
sycl::detail::code_location::current()) {
181-
#ifdef __DPCPP_ENABLE_UNFINISHED_NO_CGH_SUBMIT
182178
// TODO The handler-less path does not support kernel function properties yet.
183179
if constexpr (!(ext::oneapi::experimental::detail::
184180
HasKernelPropertiesGetMethod<
185181
const KernelType &>::value)) {
186182
detail::submit_kernel_direct(
187183
q, ext::oneapi::experimental::empty_properties_t{},
188184
nd_range<2>(r, size), std::forward<KernelType>(k));
189-
} else
190-
#endif
191-
{
185+
} else {
192186
submit(
193187
q, [&](handler &h) { launch_grouped<KernelType>(h, r, size, k); },
194188
codeLoc);
@@ -199,17 +193,14 @@ template <typename KernelType, typename = typename std::enable_if_t<
199193
void launch_grouped(const queue &q, range<3> r, range<3> size, KernelType &&k,
200194
const sycl::detail::code_location &codeLoc =
201195
sycl::detail::code_location::current()) {
202-
#ifdef __DPCPP_ENABLE_UNFINISHED_NO_CGH_SUBMIT
203196
// TODO The handler-less path does not support kernel function properties yet.
204197
if constexpr (!(ext::oneapi::experimental::detail::
205198
HasKernelPropertiesGetMethod<
206199
const KernelType &>::value)) {
207200
detail::submit_kernel_direct(
208201
q, ext::oneapi::experimental::empty_properties_t{},
209202
nd_range<3>(r, size), std::forward<KernelType>(k));
210-
} else
211-
#endif
212-
{
203+
} else {
213204
submit(
214205
q, [&](handler &h) { launch_grouped<KernelType>(h, r, size, k); },
215206
codeLoc);

sycl/include/sycl/queue.hpp

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3275,7 +3275,7 @@ class __SYCL_EXPORT queue : public detail::OwnerLessBase<queue> {
32753275
parallel_for(nd_range<Dims> Range, RestT &&...Rest) {
32763276
constexpr detail::code_location CodeLoc = getCodeLocation<KernelName>();
32773277
detail::tls_code_loc_t TlsCodeLocCapture(CodeLoc);
3278-
#ifdef __DPCPP_ENABLE_UNFINISHED_NO_CGH_SUBMIT
3278+
32793279
using KernelType = std::tuple_element_t<0, std::tuple<RestT...>>;
32803280

32813281
// TODO The handler-less path does not support reductions and kernel
@@ -3287,9 +3287,7 @@ class __SYCL_EXPORT queue : public detail::OwnerLessBase<queue> {
32873287
return detail::submit_kernel_direct<KernelName, true>(
32883288
*this, ext::oneapi::experimental::empty_properties_t{}, Range,
32893289
Rest...);
3290-
} else
3291-
#endif
3292-
{
3290+
} else {
32933291
return submit(
32943292
[&](handler &CGH) {
32953293
CGH.template parallel_for<KernelName>(Range, Rest...);

sycl/unittests/Extensions/FreeFunctionCommands/FreeFunctionCommandsEvents.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -227,7 +227,6 @@ TEST_F(FreeFunctionCommandsEventsTests, LaunchGroupedShortcutNoEvent) {
227227
ASSERT_EQ(counter_urEnqueueKernelLaunch, size_t{1});
228228
}
229229

230-
#if __DPCPP_ENABLE_UNFINISHED_NO_CGH_SUBMIT
231230
TEST_F(FreeFunctionCommandsEventsTests,
232231
LaunchGroupedShortcutMoveKernelNoEvent) {
233232
mock::getCallbacks().set_replace_callback("urEnqueueKernelLaunch",
@@ -276,7 +275,6 @@ TEST_F(FreeFunctionCommandsEventsTests,
276275
ASSERT_EQ(TestMoveFunctor::MoveCtorCalls, 1);
277276
ASSERT_EQ(counter_urEnqueueKernelLaunch, size_t{2});
278277
}
279-
#endif
280278

281279
TEST_F(FreeFunctionCommandsEventsTests, SubmitLaunchGroupedKernelNoEvent) {
282280
mock::getCallbacks().set_replace_callback("urEnqueueKernelLaunch",

0 commit comments

Comments
 (0)