File tree Expand file tree Collapse file tree 2 files changed +19
-1
lines changed Expand file tree Collapse file tree 2 files changed +19
-1
lines changed Original file line number Diff line number Diff line change @@ -494,7 +494,6 @@ class __SYCL_EXPORT handler {
494494 template <class Kernel > void setDeviceKernelInfo (void *KernelFuncPtr) {
495495 constexpr auto Info = detail::CompileTimeKernelInfo<Kernel>;
496496 MKernelName = Info.Name ;
497- // TODO support ESIMD in no-integration-header case too.
498497 setKernelInfo (KernelFuncPtr, Info.NumParams , Info.ParamDescGetter ,
499498 Info.IsESIMD , Info.HasSpecialCaptures );
500499 setDeviceKernelInfoPtr (&detail::getDeviceKernelInfo<Kernel>());
Original file line number Diff line number Diff line change @@ -553,6 +553,25 @@ event handler::finalize() {
553553 &detail::ProgramManager::getInstance ().getOrCreateDeviceKernelInfo (
554554 toKernelNameStrT (MKernelName));
555555 }
556+
557+ detail::DeviceKernelInfo &Info = *impl->MDeviceKernelInfoPtr ;
558+ (void )Info;
559+
560+ // Make sure that information set by old binaries gets properly copied to
561+ // the `DeviceKernelInfo` so that the rest of the code base could use it as
562+ // the single source of all the data:
563+ if (MKernelName != static_cast <std::string_view>(Info.Name )) {
564+ std::cout << " MKernelName: " << MKernelName << std::endl;
565+ std::cout << " Info.Name: " << static_cast <std::string_view>(Info.Name )
566+ << std::endl;
567+ }
568+ assert (MKernelName == static_cast <std::string_view>(Info.Name ));
569+ assert (static_cast <unsigned >(impl->MKernelNumArgs ) == Info.NumParams );
570+ assert (impl->MKernelParamDescGetter == Info.ParamDescGetter ||
571+ impl->MKernelParamDescGetter == nullptr );
572+ assert (impl->MKernelIsESIMD == Info.IsESIMD );
573+ assert (impl->MKernelHasSpecialCaptures == Info.HasSpecialCaptures );
574+
556575 // If there were uses of set_specialization_constant build the kernel_bundle
557576 detail::kernel_bundle_impl *KernelBundleImpPtr =
558577 getOrInsertHandlerKernelBundlePtr (/* Insert=*/ false );
You can’t perform that action at this time.
0 commit comments