[SYCL][Graph] Optimize graph enqueue for in-order queues
Optimizes the enqueue() function of sycl graphs to bypass the scheduler whenever possible and avoid creating events when not needed.
- Refactors the executable graph
enqueue()to have different paths depending on workload:- The direct path will be used when there are no host-tasks or accessor requirements in the graph and the execution dependencies are considered safe to bypass the scheduler.
- The scheduler path will be used when there are requirements in the graph but no host-tasks or, if the execution dependencies require using the scheduler.
- The multiple partitions path will be used when the graph contains
host-taskswhich requires scheduling multiple graph partitions. The implementation was also changed to avoid adding unnecessary event dependencies to partition executions and avoiding copyingCGDatawhen possible.
- Extends the changes in https://github.com/intel/llvm/pull/18277 to sycl graphs. This means that no implicit events will be created when using in-order queues and graphs without
host-tasks. Also updates the handler to only request events from the graphenqueue()when they are needed.
@cperkinsintel , final review is on you:
@intel/llvm-gatekeepers Can this PR be merged? The existing failures seem to be CI issues. This PR was green for those jobs before:
Intel-Arc jobs:
-
https://github.com/intel/llvm/actions/runs/15681443933/job/44175220366?pr=18792
-
https://github.com/intel/llvm/actions/runs/15681443933/job/44175220336?pr=18792
Cuda UR Job:
- https://github.com/intel/llvm/actions/runs/15681443929/job/44174565853?pr=18792
There were only unrelated changes to the HIP UR adapter made since then.
Edit: Nevermind, recently merged commits broke this PR, needs to be rebased.
@intel/llvm-gatekeepers This PR is ready to merge. The CI failure on PVC is unrelated (I have seen it in other PR's).
@intel/llvm-gatekeepers This PR is ready to merge. The CI failure on PVC is unrelated (I have seen it in other PR's).
Failing tests are unrelated and tracked by https://github.com/intel/llvm/issues/18932