From f49597cb7cdbeda200353bdc5f86e9a7f7954a52 Mon Sep 17 00:00:00 2001 From: Sergey Semenov Date: Thu, 11 Dec 2025 03:42:53 -0800 Subject: [PATCH 1/2] [SYCL][NFC] Fix copy instead of move Coverity hits --- sycl/source/detail/queue_impl.cpp | 2 +- sycl/source/detail/queue_impl.hpp | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/sycl/source/detail/queue_impl.cpp b/sycl/source/detail/queue_impl.cpp index dc864aeb9e77b..9737d225048f2 100644 --- a/sycl/source/detail/queue_impl.cpp +++ b/sycl/source/detail/queue_impl.cpp @@ -624,7 +624,7 @@ EventImplPtr queue_impl::submit_graph_direct_impl( detail::CGType::ExecCommandBuffer), /*SchedulerBypass*/ false}; } else { - return ExecGraph->enqueue(*this, CGData, EventNeeded); + return ExecGraph->enqueue(*this, std::move(CGData), EventNeeded); } }; // If the graph contains a host task, we may need to insert a barrier prior diff --git a/sycl/source/detail/queue_impl.hpp b/sycl/source/detail/queue_impl.hpp index 2dbd430c6b388..4b17a8206488c 100644 --- a/sycl/source/detail/queue_impl.hpp +++ b/sycl/source/detail/queue_impl.hpp @@ -381,7 +381,7 @@ class queue_impl : public std::enable_shared_from_this { ExecGraph, sycl::span DepEvents, const detail::code_location &CodeLoc, bool IsTopCodeLoc) { - submit_graph_direct_impl(ExecGraph, false, DepEvents, CodeLoc, + submit_graph_direct_impl(std::move(ExecGraph), false, DepEvents, CodeLoc, IsTopCodeLoc); } @@ -391,7 +391,7 @@ class queue_impl : public std::enable_shared_from_this { sycl::span DepEvents, const detail::code_location &CodeLoc, bool IsTopCodeLoc) { return createSyclObjFromImpl(submit_graph_direct_impl( - ExecGraph, true, DepEvents, CodeLoc, IsTopCodeLoc)); + std::move(ExecGraph), true, DepEvents, CodeLoc, IsTopCodeLoc)); } void submit_without_event(const detail::type_erased_cgfo_ty &CGF, From 848d78db7721d65c178b5c07b5664de070c94234 Mon Sep 17 00:00:00 2001 From: Sergey Semenov Date: Mon, 15 Dec 2025 06:49:42 -0800 Subject: [PATCH 2/2] Apply comment --- sycl/source/detail/queue_impl.hpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/sycl/source/detail/queue_impl.hpp b/sycl/source/detail/queue_impl.hpp index 4b17a8206488c..92ed818d58700 100644 --- a/sycl/source/detail/queue_impl.hpp +++ b/sycl/source/detail/queue_impl.hpp @@ -377,21 +377,21 @@ class queue_impl : public std::enable_shared_from_this { } void submit_graph_direct_without_event( - std::shared_ptr - ExecGraph, + const std::shared_ptr + &ExecGraph, sycl::span DepEvents, const detail::code_location &CodeLoc, bool IsTopCodeLoc) { - submit_graph_direct_impl(std::move(ExecGraph), false, DepEvents, CodeLoc, + submit_graph_direct_impl(ExecGraph, false, DepEvents, CodeLoc, IsTopCodeLoc); } event submit_graph_direct_with_event( - std::shared_ptr - ExecGraph, + const std::shared_ptr + &ExecGraph, sycl::span DepEvents, const detail::code_location &CodeLoc, bool IsTopCodeLoc) { return createSyclObjFromImpl(submit_graph_direct_impl( - std::move(ExecGraph), true, DepEvents, CodeLoc, IsTopCodeLoc)); + ExecGraph, true, DepEvents, CodeLoc, IsTopCodeLoc)); } void submit_without_event(const detail::type_erased_cgfo_ty &CGF,