-
Notifications
You must be signed in to change notification settings - Fork 744
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[SYCL] Host task implementation (#1471)
This patch is part 1 in a series of patches for host-interop-task proposal by Codeplay. See the proposal at [1]. This patch implements: - host-task execution mechanism; - enqueue of host-task without interop_handle argument; - spin-lock to await for host and synchronous device events completion. This patch reimplements glue/connection of events within different contexts to eliminate use of event callback in favor of host-task. Host-task execution mechanism involves: - thread-pool for queue to execute host-task's user lambda in; - explicit call to event_impl::setComplete() for host events and device-side synchronous events; - helper class DispatchHostTask which wraps call to host-task's user lambda. Thread pool's size is set via `SYCL_QUEUE_THREAD_POOL_SIZE` environment variable and defaults to 1. Even though host-task is enqueued to device queue it'll be executed on the default host queue. Host-task is represented via distinct ExecCGCommand paired with EmptyCommand. Any other command, which depends on host-task will really depend on it's EmptyCommand. The EmptyCommand is in blocked state initially. Class DispatchHostTask awaits for host-task's dependency events, then calls to host-task's user lambda and unblocks any dependent commands via unblocking it's EmptyCommand and enqueueing of leaves for requirements (i.e. host accessors required for execution of this host-task). [1] https://github.com/codeplaysoftware/standards-proposals/blob/master/host_task/host_task.md
- Loading branch information
Showing
23 changed files
with
1,070 additions
and
135 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.