Skip to content

Commit 59984ce

Browse files
committed
Do not set the DeviceKernelInfo twice
1 parent 4ac3937 commit 59984ce

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

sycl/source/handler.cpp

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2538,7 +2538,11 @@ sycl::detail::CGType handler::getType() const { return impl->MCGType; }
25382538
void handler::setDeviceKernelInfo(kernel &&Kernel) {
25392539
MKernel = detail::getSyclObjImpl(std::move(Kernel));
25402540
MKernelName = getKernelName();
2541-
setDeviceKernelInfoPtr(&MKernel->getDeviceKernelInfo());
2541+
if (MKernel->isInterop()) {
2542+
// For regular kernels (created from user functors) the DeviceKernelInfo is
2543+
// set from the ProgramManager
2544+
setDeviceKernelInfoPtr(&MKernel->getDeviceKernelInfo());
2545+
}
25422546
setType(detail::CGType::Kernel);
25432547

25442548
// If any extra actions are added here make sure that logic around

0 commit comments

Comments
 (0)