Skip to content

Commit 7369251

Browse files
authored
[SYCL][Graph] Removing unnecessary copy of KernelName (#17833)
by using `const auto &` instead of `auto`.
1 parent 3a353b1 commit 7369251

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Diff for: sycl/source/detail/graph_impl.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,14 @@
88

99
#define __SYCL_GRAPH_IMPL_CPP
1010

11-
#include <stack>
1211
#include <detail/graph_impl.hpp>
1312
#include <detail/handler_impl.hpp>
1413
#include <detail/kernel_arg_mask.hpp>
1514
#include <detail/program_manager/program_manager.hpp>
1615
#include <detail/queue_impl.hpp>
1716
#include <detail/scheduler/commands.hpp>
1817
#include <detail/sycl_mem_obj_t.hpp>
18+
#include <stack>
1919
#include <sycl/detail/common.hpp>
2020
#ifdef __INTEL_PREVIEW_BREAKING_CHANGES
2121
#include <sycl/detail/string_view.hpp>
@@ -1540,7 +1540,7 @@ void exec_graph_impl::populateURKernelUpdateStructs(
15401540
// and can therefore not be looked up, but since they are self-contained
15411541
// they can simply be launched directly.
15421542
if (KernelBundleImplPtr && !KernelBundleImplPtr->isInterop()) {
1543-
auto KernelName = ExecCG.MKernelName;
1543+
const auto &KernelName = ExecCG.MKernelName;
15441544
kernel_id KernelID =
15451545
sycl::detail::ProgramManager::getInstance().getSYCLKernelID(KernelName);
15461546
kernel SyclKernel =

0 commit comments

Comments
 (0)