diff --git a/sycl/source/detail/program_impl.cpp b/sycl/source/detail/program_impl.cpp index 4908afd78b43e..59fb15178114e 100644 --- a/sycl/source/detail/program_impl.cpp +++ b/sycl/source/detail/program_impl.cpp @@ -160,8 +160,8 @@ program_impl::program_impl(ContextImplPtr Context, }); SyclContextDevices.erase(NewEnd, SyclContextDevices.end()); MDevices = SyclContextDevices; - RT::PiDevice Device = getSyclObjImpl(MDevices[0])->getHandleRef(); assert(!MDevices.empty() && "No device found for this program"); + RT::PiDevice Device = getSyclObjImpl(MDevices[0])->getHandleRef(); // TODO check build for each device instead cl_program_binary_type BinaryType; Plugin.call(