-
Notifications
You must be signed in to change notification settings - Fork 91
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
[SYCLomatic] Create separate util file for groups #1784
[SYCLomatic] Create separate util file for groups #1784
Conversation
Is this moving functionality from the other header as is or rewriting + making changes? If we are moving code and keeping the namespace and everything the same, that is one type of review where we just need to insure that all existing SYCLomatic code can still see the new location, and it is successfully unchanged, etc. If we are doing more than just moving code, then we need to review it as "new code", and also figure out how it fits with what is already there. It would be good to make this clear in the description of the PR (without requiring the context of the email discussion to understand it). |
Yes added description - this is mainly a step for removing the existing sort & exchange coop-group apis from dpct extensions namespace to group_utils namespace without changing any functionality. |
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'd like to include group_utils.h in dpct/dpl_utils.h, so this PR will not breaking any existing code.
// | ||
//===----------------------------------------------------------------===// | ||
|
||
#ifndef __DPCT_DPCPP_EXTENSIONS_H__ |
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.
The include guard name should be changed since it is currently mirroring the macro name in the dpcpp_extensions.h
file.
#include "dpl_extras/iterators.h" | ||
#include "dpl_extras/memory.h" |
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 looks like except for the added #include "group_utils.hpp"
, the other changes are just shifting the order of the includes. Does this matter or can we restore these unneeded changes?
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.
Yes this was caused by the format issue, let me revert to original.
|
||
#include "dpct.hpp" | ||
#include "dpl_extras/dpcpp_extensions.h" | ||
#include "functional.h" |
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 believe this should be "dpl_extras/functional.h"
Basically LGTM. You should check https://github.com/oneapi-src/SYCLomatic/blob/SYCLomatic/clang/lib/DPCT/HeaderTypes.inc as well to see if it needs to add a new entry. |
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, @danhoeflinger @mmichel11 Can you please take another look?
@@ -73,6 +73,9 @@ const std::string FftUtilsAllContentStr = | |||
const std::string LapackUtilsAllContentStr = | |||
#include "clang/DPCT/lapack_utils.hpp.inc" | |||
; | |||
const std::string GroupUtilsAllContentStr = |
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'm not sure about why, but you may need to add a similar line to this to follow the example of LapackUtilsAllContentStr
:
extern const std::string LapackUtilsAllContentStr; |
(still failing the lit check)
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.
Added , but still fails in lit.
I don't see any issues within |
Co-authored-by: Dan Hoeflinger <[email protected]>
Co-authored-by: Dan Hoeflinger <[email protected]>
@yihanwg @zhimingwang36 could you help with the lit failure issue in CI ? Thanks. |
Sure, let me take a look. [update] Fixed. |
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
From email discussion on SYCLcompat for cooperative group apis, this is created to add all header algorithms related to block/warp for sycl.
This PR only replaces the group apis - exchange and sort (from these PRs : #1562 & #1483 ) which were added to the dpct_extensions.h file to group_utils.h file. No other changes apart from removing the existing code from extensions to the group_utils.h file. Correspondingly the tests related to PRs oneapi-src/SYCLomatic-test#601 & oneapi-src/SYCLomatic-test#594 need to be updated accordingly with respect to the changes in namespace only. The aim of this PR is only to remove the functionality from extensions namespace to group_utils namespace.
cc @danhoeflinger @mmichel11 @zhimingwang36 @yihanwg