From f49597cb7cdbeda200353bdc5f86e9a7f7954a52 Mon Sep 17 00:00:00 2001 From: Sergey Semenov Date: Thu, 11 Dec 2025 03:42:53 -0800 Subject: [PATCH] [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 dc864aeb9e77..9737d225048f 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 2dbd430c6b38..4b17a8206488 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,