llvm icon indicating copy to clipboard operation
llvm copied to clipboard

[SYCL][Graph] Optimize graph enqueue for in-order queues

Open fabiomestre opened this issue 5 months ago • 2 comments

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-tasks which requires scheduling multiple graph partitions. The implementation was also changed to avoid adding unnecessary event dependencies to partition executions and avoiding copying CGData when 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 graph enqueue() when they are needed.

fabiomestre avatar Jun 03 '25 16:06 fabiomestre