diff --git a/sycl/source/detail/cg.hpp b/sycl/source/detail/cg.hpp index 2eb44926f7381..bc729f1340b0a 100644 --- a/sycl/source/detail/cg.hpp +++ b/sycl/source/detail/cg.hpp @@ -265,7 +265,7 @@ class CGExecKernel : public CG { bool MKernelUsesClusterLaunch = false; size_t MKernelWorkGroupMemorySize = 0; - CGExecKernel(NDRDescT NDRDesc, std::shared_ptr HKernel, + CGExecKernel(const NDRDescT &NDRDesc, std::shared_ptr HKernel, std::shared_ptr SyclKernel, std::shared_ptr KernelBundle, CG::StorageInitHelper CGData, std::vector Args, @@ -276,9 +276,8 @@ class CGExecKernel : public CG { CGType Type, ur_kernel_cache_config_t KernelCacheConfig, bool KernelIsCooperative, bool MKernelUsesClusterLaunch, size_t KernelWorkGroupMemorySize, detail::code_location loc = {}) - : CG(Type, std::move(CGData), std::move(loc)), - MNDRDesc(std::move(NDRDesc)), MHostKernel(std::move(HKernel)), - MSyclKernel(std::move(SyclKernel)), + : CG(Type, std::move(CGData), std::move(loc)), MNDRDesc(NDRDesc), + MHostKernel(std::move(HKernel)), MSyclKernel(std::move(SyclKernel)), MKernelBundle(std::move(KernelBundle)), MArgs(std::move(Args)), MKernelName(std::move(KernelName)), MKernelNameBasedCachePtr(KernelNameBasedCachePtr), diff --git a/sycl/source/handler.cpp b/sycl/source/handler.cpp index 346a396b464e6..65713eea639a2 100644 --- a/sycl/source/handler.cpp +++ b/sycl/source/handler.cpp @@ -710,7 +710,7 @@ event handler::finalize() { // assert feature to check if kernel uses assertions #endif CommandGroup.reset(new detail::CGExecKernel( - std::move(impl->MNDRDesc), std::move(MHostKernel), std::move(MKernel), + impl->MNDRDesc, std::move(MHostKernel), std::move(MKernel), std::move(impl->MKernelBundle), std::move(impl->CGData), std::move(impl->MArgs), toKernelNameStrT(MKernelName), impl->MKernelNameBasedCachePtr, std::move(MStreamStorage),