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
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
Copy file name to clipboardExpand all lines: sycl/doc/EnvironmentVariables.md
+1Lines changed: 1 addition & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -23,6 +23,7 @@ subject to change. Do not rely on these variables in production code.
23
23
| SYCL_THROW_ON_BLOCK | Any(\*) | Throw an exception on attempt to wait for a blocked command. |
24
24
| SYCL_DEVICELIB_INHIBIT_NATIVE | String of device library extensions (separated by a whitespace) | Do not rely on device native support for devicelib extensions listed in this option. |
25
25
| SYCL_DEVICE_ALLOWLIST | A list of devices and their minimum driver version following the pattern: DeviceName:{{XXX}},DriverVersion:{{X.Y.Z.W}}. Also may contain PlatformName and PlatformVersion | Filter out devices that do not match the pattern specified. Regular expression can be passed and the DPC++ runtime will select only those devices which satisfy the regex. |
26
+
| SYCL_QUEUE_THREAD_POOL_SIZE | Positive integer | Number of threads in thread pool of queue. |
26
27
`(*) Note: Any means this environment variable is effective when set to any non-null value.`
0 commit comments