-
Notifications
You must be signed in to change notification settings - Fork 787
[SYCL][Graph] Implement dynamic local accessors #18437
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
[SYCL][Graph] Implement dynamic local accessors #18437
Conversation
56eaa40
to
32945a2
Compare
00f1bbf
to
da31888
Compare
db1d142
to
19e107c
Compare
Missing reviews from @intel/llvm-reviewers-runtime and @intel/dpcpp-cfe-reviewers. Could someone from these groups have a look at this PR? |
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.
Looks good to me, but I'm not as familiar with this code or Ben/Konrad, so should get one or both of them to approve this too.
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.
LGTM!
setArgHelper(int ArgIndex, | ||
ext::oneapi::experimental::detail::dynamic_work_group_memory_base | ||
&DynWorkGroupBase); | ||
template <typename DataT, typename PropertyListT> |
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.
nit: would it make sense to only have declaration here and provide out-of-class definition somewhere in the graph headers?
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.
I think that it makes sense to keep this in the handler header, at least for this PR. There is already a precedent to having setArgHelper()
implementations in the handler for existing graph functionality (e.g. dynamic_parameter
) and other extensions (e.g. work_group_memory
). Moving only part of the implementation to the graph headers can be confusing. However, if you think that the handler header is getting too large / full of extension functionality, we can consider possible refactoring options as part of future work.
Friendly ping to @intel/dpcpp-cfe-reviewers. Would appreciate a review on this PR. |
@intel/llvm-gatekeepers This PR should be ready to merge. |
After intel#18437, the runtime library is producing a warning about an unused variable AccTarget in handler.cpp. This is due to the variable only being used in assert, which may in turn be removed when assertions are disabled. This commit removes the variable in favor of making the conversion inside the assert. Signed-off-by: Larsen, Steffen <[email protected]>
Post-commit failure addressed in #18675. |
After #18437, the runtime library is producing a warning about an unused variable AccTarget in handler.cpp. This is due to the variable only being used in assert, which may in turn be removed when assertions are disabled. This commit removes the variable in favor of making the conversion inside the assert. Signed-off-by: Larsen, Steffen <[email protected]>
@@ -3520,7 +3519,14 @@ _ZN4sycl3_V17handler11saveCodeLocENS0_6detail13code_locationE | |||
_ZN4sycl3_V17handler11saveCodeLocENS0_6detail13code_locationEb | |||
_ZN4sycl3_V17handler11storeRawArgEPKvm | |||
_ZN4sycl3_V17handler12addReductionERKSt10shared_ptrIKvE | |||
_ZN4sycl3_V17handler12setArgHelperEiRNS0_3ext6oneapi12experimental6detail30dynamic_work_group_memory_baseE | |||
_ZN4sycl3_V13ext6oneapi12experimental6detail30dynamic_work_group_memory_base18updateWorkGroupMemEm |
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.
These aren't sorted, @fabiomestre how did you generate this diff? Was it the script or did you do it manually?
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.
@fabiomestre , ping.
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.
It has been a while so I don't remember exactly. I believe I used the script, for the initial PR but there were changes as a result of review comments, maybe I didn't use it at that point and assumed that the CI would tell me if anything was wrong.
I tried to run the script just now and it doesn't show any changes. How do I check whether this files are correctly sorted or not? If this is important, wouldn't it make sense for the CI to enforce it?
Please let me know if there is anything that still needs to be fixed at this point as a result of this PR. I can look into it and open a follow up PR.
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.
Nevermind, I ran the script again and got the diff. Please review: https://github.com/intel/llvm/pull/18924/files
Note that it also showed diff for changes unrelated to this PR (e.g. submit_without_events).
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.
I've been thinking that the CI should check if the lines are sorted, but I wasn't sure if breaks when people manually edit the file, or if difference in the development environment (e.g. python version) make the script itself produce different output, hence my questions.
If that's always some manual edit, then we can enforce sorting, otherwise some tooling change is required first.
impl
member variable. This brings it closer to the design of other sycl classes and avoids future ABI break issues.dynamic_work_group_memory
class whose specification has not been merged yet and is not yet officially supported.