You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Mar 2, 2026. It is now read-only.
Because of the delayed submission of the lambda functions passed to the sycl::queue in either mode of graph construction it is possible for a situation to arise where the lambda captures variables which are alive at time of submission to the queue but out of scope at time of graph execution, which causes undefined behaviour and errors when executing a graph. For example:
voidrun_some_kernel(sycl::queue q, int* data){
// data is captured by ref here but will have gone out of scope when the // CGF is later run when the graph is executed.
q.submit([&](sycl::handler& h){
// Call some kernel which uses data here
});
}
intmain(){
sycl::queue q;
int* someUsmAllocatedPtr;
q.begin_recording();
run_some_kernel(q, someUsmAllocatedPtr);
q.end_recording();
}
This scenario is potentially more common with record and replay but not improbable with the explicit API.