diff --git a/sycl/include/sycl/queue.hpp b/sycl/include/sycl/queue.hpp index 2d0967630f9e3..f8101a3bd961d 100644 --- a/sycl/include/sycl/queue.hpp +++ b/sycl/include/sycl/queue.hpp @@ -2859,7 +2859,7 @@ class __SYCL_EXPORT queue : public detail::OwnerLessBase { } }; #endif // __SYCL_USE_FALLBACK_ASSERT - return submit_with_event_impl(CGF, SI, TlsCodeLocCapture.query(), + return submit_with_event_impl(std::move(CGF), SI, TlsCodeLocCapture.query(), TlsCodeLocCapture.isToplevel()); } diff --git a/sycl/source/detail/graph_impl.cpp b/sycl/source/detail/graph_impl.cpp index 67ccf0a1885e7..8d673bc844d44 100644 --- a/sycl/source/detail/graph_impl.cpp +++ b/sycl/source/detail/graph_impl.cpp @@ -1765,7 +1765,7 @@ void modifiable_command_graph::print_graph(sycl::detail::string_view pathstr, std::string path{pathstr.data()}; graph_impl::ReadLock Lock(impl->MMutex); if (path.substr(path.find_last_of(".") + 1) == "dot") { - impl->printGraphAsDot(path, verbose); + impl->printGraphAsDot(std::move(path), verbose); } else { throw sycl::exception( sycl::make_error_code(errc::invalid), diff --git a/sycl/source/detail/memory_manager.cpp b/sycl/source/detail/memory_manager.cpp index 880def95eb314..3069595d2b6d8 100644 --- a/sycl/source/detail/memory_manager.cpp +++ b/sycl/source/detail/memory_manager.cpp @@ -1227,7 +1227,8 @@ getOrBuildProgramForDeviceGlobal(QueueImplPtr Queue, PM.getDeviceImage(DeviceGlobalEntry->MImages, Context, Device); device_image_plain DeviceImage = PM.getDeviceImageFromBinaryImage(&Img, Context, Device); - device_image_plain BuiltImage = PM.build(DeviceImage, {Device}, {}); + device_image_plain BuiltImage = + PM.build(std::move(DeviceImage), {Device}, {}); return getSyclObjImpl(BuiltImage)->get_ur_program_ref(); } diff --git a/sycl/source/detail/program_manager/program_manager.cpp b/sycl/source/detail/program_manager/program_manager.cpp index ad9cf4d9b92f8..3f1ae09a7966f 100644 --- a/sycl/source/detail/program_manager/program_manager.cpp +++ b/sycl/source/detail/program_manager/program_manager.cpp @@ -2723,7 +2723,8 @@ ProgramManager::link(const DevImgPlainWithDeps &ImgWithDeps, if (Error != UR_RESULT_SUCCESS) { if (LinkedProg) { - const std::string ErrorMsg = getProgramBuildLog(LinkedProg, ContextImpl); + const std::string ErrorMsg = + getProgramBuildLog(LinkedProg, std::move(ContextImpl)); throw sycl::exception(make_error_code(errc::build), ErrorMsg); } throw set_ur_error(exception(make_error_code(errc::build), "link() failed"), @@ -2751,7 +2752,7 @@ ProgramManager::link(const DevImgPlainWithDeps &ImgWithDeps, // TODO: Make multiple sets of device images organized by devices they are // compiled for. - return {createSyclObjFromImpl(ExecutableImpl)}; + return {createSyclObjFromImpl(std::move(ExecutableImpl))}; } // The function duplicates most of the code from existing getBuiltPIProgram. diff --git a/sycl/source/detail/scheduler/commands.cpp b/sycl/source/detail/scheduler/commands.cpp index 31db161f88726..ac00313e670de 100644 --- a/sycl/source/detail/scheduler/commands.cpp +++ b/sycl/source/detail/scheduler/commands.cpp @@ -2849,8 +2849,8 @@ ur_result_t enqueueReadWriteHostPipe(const QueueImplPtr &Queue, ProgramManager::getInstance().getDeviceImageFromBinaryImage( hostPipeEntry->getDevBinImage(), Queue->get_context(), Queue->get_device()); - device_image_plain BuiltImage = - ProgramManager::getInstance().build(devImgPlain, {Device}, {}); + device_image_plain BuiltImage = ProgramManager::getInstance().build( + std::move(devImgPlain), {std::move(Device)}, {}); Program = getSyclObjImpl(BuiltImage)->get_ur_program_ref(); } assert(Program && "Program for this hostpipe is not compiled.");