@@ -397,15 +397,6 @@ class kernel_bundle_impl {
397397 return SS.str ();
398398 }
399399
400- // TODO: remove duplication in kernel_compiler_sycl.cpp.
401- std::string userArgsAsString (const std::vector<std::string> &UserArguments) {
402- return std::accumulate (UserArguments.begin (), UserArguments.end (),
403- std::string (" " ),
404- [](const std::string &A, const std::string &B) {
405- return A.empty () ? B : A + " " + B;
406- });
407- }
408-
409400 bool
410401 extKernelCompilerFetchFromCache (const std::vector<device> Devices,
411402 const std::vector<std::string> &BuildOptions,
@@ -415,7 +406,7 @@ class kernel_bundle_impl {
415406 ContextImplPtr ContextImpl = getSyclObjImpl (MContext);
416407 const PluginPtr &Plugin = ContextImpl->getPlugin ();
417408
418- std::string UserArgs = userArgsAsString (BuildOptions);
409+ std::string UserArgs = syclex::detail:: userArgsAsString (BuildOptions);
419410 auto BinProg = PersistentDeviceCodeCache::getCompiledKernelFromDisc (
420411 Devices[0 ], UserArgs, SourceStr);
421412 if (!BinProg.empty ()) {
@@ -509,7 +500,6 @@ class kernel_bundle_impl {
509500 " languages at this time" );
510501 }();
511502
512- // CP ur_program_handle_t UrProgram = nullptr;
513503 Plugin->call <UrApiKind::urProgramCreateWithIL>(
514504 ContextImpl->getHandleRef (), spirv.data (), spirv.size (), nullptr ,
515505 &UrProgram);
@@ -559,7 +549,8 @@ class kernel_bundle_impl {
559549 // If caching enabled and kernel not fetched from cache, cache.
560550 if (PersistentDeviceCodeCache::isEnabled () && !FetchedFromCache) {
561551 PersistentDeviceCodeCache::putCompiledKernelToDisc (
562- Devices[0 ], userArgsAsString (BuildOptions), SourceStr, UrProgram);
552+ Devices[0 ], syclex::detail::userArgsAsString (BuildOptions), SourceStr,
553+ UrProgram);
563554 }
564555
565556 return std::make_shared<kernel_bundle_impl>(MContext, MDevices, DevImg,
0 commit comments