Skip to content

Commit a30c726

Browse files
committed
Pass secondary queue if not null
1 parent fcb88c0 commit a30c726

File tree

1 file changed

+10
-3
lines changed

1 file changed

+10
-3
lines changed

sycl/source/detail/queue_impl.hpp

+10-3
Original file line numberDiff line numberDiff line change
@@ -364,9 +364,16 @@ class queue_impl {
364364
const std::shared_ptr<queue_impl> &Self,
365365
const SubmissionInfo &SubmitInfo,
366366
const detail::code_location &Loc, bool IsTopCodeLoc) {
367-
event ResEvent =
368-
submit_impl(CGF, Self, Self, nullptr,
369-
/*CallerNeedsEvent=*/true, Loc, IsTopCodeLoc, SubmitInfo);
367+
368+
event ResEvent;
369+
if (SubmitInfo.SecondaryQueue())
370+
ResEvent =
371+
submit_impl(CGF, Self, Self, SubmitInfo.SecondaryQueue(),
372+
/*CallerNeedsEvent=*/true, Loc, IsTopCodeLoc, SubmitInfo);
373+
else
374+
ResEvent =
375+
submit_impl(CGF, Self, Self, nullptr,
376+
/*CallerNeedsEvent=*/true, Loc, IsTopCodeLoc, SubmitInfo);
370377
return discard_or_return(ResEvent);
371378
}
372379

0 commit comments

Comments
 (0)