Skip to content

Commit 626540c

Browse files
committed
Don't use secondary queue in submit_without_event
1 parent a30c726 commit 626540c

File tree

1 file changed

+4
-13
lines changed

1 file changed

+4
-13
lines changed

sycl/source/detail/queue_impl.hpp

+4-13
Original file line numberDiff line numberDiff line change
@@ -382,21 +382,12 @@ class queue_impl {
382382
const SubmissionInfo &SubmitInfo,
383383
const detail::code_location &Loc,
384384
bool IsTopCodeLoc) {
385-
if (SubmitInfo.SecondaryQueue()) {
386-
const std::shared_ptr<queue_impl> SecondQueue =
387-
SubmitInfo.SecondaryQueue();
388-
try {
389-
submit_impl(CGF, Self, Self, SecondQueue,
390-
/*CallerNeedsEvent=*/false, Loc, IsTopCodeLoc, SubmitInfo);
391-
} catch (...) {
392-
SecondQueue->submit_impl(CGF, SecondQueue, Self, SecondQueue,
393-
/*CallerNeedsEvent=*/false, Loc, IsTopCodeLoc,
394-
SubmitInfo);
395-
}
396-
} else {
385+
if (SubmitInfo.SecondaryQueue())
386+
submit_impl(CGF, Self, Self, SubmitInfo.SecondaryQueue(),
387+
/*CallerNeedsEvent=*/false, Loc, IsTopCodeLoc, SubmitInfo);
388+
else
397389
submit_impl(CGF, Self, Self, nullptr, /*CallerNeedsEvent=*/false, Loc,
398390
IsTopCodeLoc, SubmitInfo);
399-
}
400391
}
401392

402393
/// Performs a blocking wait for the completion of all enqueued tasks in the

0 commit comments

Comments
 (0)