-
Notifications
You must be signed in to change notification settings - Fork 787
[SYCL] Add support for native root group implementation #11043
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Signed-off-by: Michael Aziz <michael.aziz@intel.com>
@AlexeySachkov, @Pennycook, I've marked this PR as draft since the changes to |
@0x12CC - I want to make you aware of some recent changes to the specification; we renamed a few things, and moved the queries into a separate extension specification (sycl_ext_oneapi_launch_queries). I don't think you need to make these changes in this PR (since we should just be able to rename things afterwards) but I wanted to let you know. |
Signed-off-by: Michael Aziz <michael.aziz@intel.com>
…to native_root_group
Signed-off-by: Michael Aziz <michael.aziz@intel.com>
Signed-off-by: Michael Aziz <michael.aziz@intel.com>
Signed-off-by: Michael Aziz <michael.aziz@intel.com>
Signed-off-by: Michael Aziz <michael.aziz@intel.com>
Signed-off-by: Michael Aziz <michael.aziz@intel.com>
Signed-off-by: Michael Aziz <michael.aziz@intel.com>
Signed-off-by: Michael Aziz <michael.aziz@intel.com>
Signed-off-by: Michael Aziz <michael.aziz@intel.com>
Signed-off-by: Michael Aziz <michael.aziz@intel.com>
Signed-off-by: Michael Aziz <michael.aziz@intel.com>
Signed-off-by: Michael Aziz <michael.aziz@intel.com>
Signed-off-by: Michael Aziz <michael.aziz@intel.com>
Signed-off-by: Michael Aziz <michael.aziz@intel.com>
Signed-off-by: Michael Aziz <michael.aziz@intel.com>
Signed-off-by: Michael Aziz <michael.aziz@intel.com>
Signed-off-by: Michael Aziz <michael.aziz@intel.com>
Thanks for the reviews, @victor-eds, @ldrumm! I've made all of the requested changes. |
This looks at a glance like it would likely be compatible with cuda's grid_group and their cooperative kernel launch api, but has someone gone through and convinced themselves that the set of interfaces in runtime/UR will support corresponding cuda functionality, as well as any other backends that may have similar functionality? |
There's been some discussion of the relevant CUDA APIs in the PR for the UR changes: oneapi-src/unified-runtime#849. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please move changes to UR files.
Signed-off-by: Michael Aziz <michael.aziz@intel.com>
@ldrumm, @jandres742, I've removed all of the changes related to UR and made the other requested changes. This PR now only includes the new PI function and the relevant changes to the SYCL runtime. The implementation for these new PI functions will be in the UR repository. Please review this updated changeset. |
thanks @0x12CC . Right, please see guidlines here https://github.com/oneapi-src/unified-runtime/pull/902/files |
@@ -573,6 +583,13 @@ pi_result piextKernelGetNativeHandle(pi_kernel Kernel, | |||
return pi2ur::piextKernelGetNativeHandle(Kernel, NativeHandle); | |||
} | |||
|
|||
pi_result piextKernelSuggestMaxCooperativeGroupCount(pi_kernel Kernel, | |||
pi_uint32 *GroupCountRet) { | |||
(void)Kernel; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this needs to be also a redirection to pi2ur, even if all that we are doing is returning 1.
Co-authored-by: Nikita Kornev <nikita.kornev@intel.com>
I've closed this PR since the branch is outdated and created #12367 to replace it. The new PR includes all of the suggestions/fixes from this PR. |
I recommend updating the branch instead of opening a new PR. It's hard to track whether comments were addressed or not. It's also unclear where to continue discussions if reviews have follow-up comments. |
Add new PI APIs and relevant runtime changes to enable root groups composed of more than one work group. This changeset includes the following changes:
piextKernelSuggestMaxCooperativeGroupCount
API to query the maximum number of work groups that can run cooperatively for a given kernel.piextEnqueueCooperativeKernelLaunch
API to launch kernels cooperatively.MKernelIsCooperative
flag to track if a kernel needs to be launched usingpiextEnqueueCooperativeKernelLaunch
orpiEnqueueKernelLaunch
. Presently, this flag is only set if the kernel has theuse_root_sync_key
property. It's expected that other features may set this flag in the future if they require all work groups to run concurrently.__spirv_ControlBarrier
withDevice
scope rather thanWorkgroup
scope.