-
Notifications
You must be signed in to change notification settings - Fork 768
[SYCL][FPGA] Refactor of [[intel::max_global_work_dim()]] attribute #3326
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
Merged
Conversation
This file contains hidden or 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 patch 1. refactors FPGA function attribute using intel#3224: [[intel::max_global_work_dim()]] attribute to better fit for community standards. 2. refactors the way we handle duplicate attributes and mutually exclusive attributes logic when present on a given declaration. 3. handles redeclarations or template instantiations properly. 4. adds tests 5. adds new test cases where the value of 'max_global_work_dim' attribute equals to 0, we shall ensure that if max_work_group_size and reqd_work_group_size attributes exist, they hold equal values (1, 1, 1). Before the new refactoring patch, we silently accepeted this test case: struct TRIFuncObjBad { [[intel::max_work_group_size(8, 8, 8)]] [[cl::reqd_work_group_size(4, 4, 4)]] [[intel::max_global_work_dim(0)]] void operator()() const {} }; Signed-off-by: Soumi Manna <soumi.manna@intel.com>
Signed-off-by: Soumi Manna <soumi.manna@intel.com>
smanna12
commented
Mar 9, 2021
smanna12
commented
Mar 9, 2021
Signed-off-by: Soumi Manna <soumi.manna@intel.com>
smanna12
commented
Mar 9, 2021
AaronBallman
reviewed
Mar 9, 2021
Signed-off-by: Soumi Manna <soumi.manna@intel.com>
smanna12
commented
Mar 9, 2021
Signed-off-by: Soumi Manna <soumi.manna@intel.com>
smanna12
commented
Mar 9, 2021
AaronBallman
previously approved these changes
Mar 9, 2021
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!
Signed-off-by: Soumi Manna <soumi.manna@intel.com>
…cl from test and redundant codes Signed-off-by: Soumi Manna <soumi.manna@intel.com>
smanna12
commented
Mar 10, 2021
Signed-off-by: Soumi Manna <soumi.manna@intel.com>
Signed-off-by: Soumi Manna <soumi.manna@intel.com>
Signed-off-by: Soumi Manna <soumi.manna@intel.com>
Can i get a review on the patch? Thanks |
Signed-off-by: Soumi Manna <soumi.manna@intel.com>
Signed-off-by: Soumi Manna <soumi.manna@intel.com>
Signed-off-by: Soumi Manna <soumi.manna@intel.com>
Signed-off-by: Soumi Manna <soumi.manna@intel.com>
Signed-off-by: Soumi Manna <soumi.manna@intel.com>
Signed-off-by: Soumi Manna <soumi.manna@intel.com>
Signed-off-by: Soumi Manna <soumi.manna@intel.com>
Signed-off-by: Soumi Manna <soumi.manna@intel.com>
Signed-off-by: Soumi Manna <soumi.manna@intel.com>
Signed-off-by: Soumi Manna <soumi.manna@intel.com>
clang/test/SemaSYCL/sycl-device-intel-max-global-work-dim-template.cpp
Outdated
Show resolved
Hide resolved
Signed-off-by: Soumi Manna <soumi.manna@intel.com>
Signed-off-by: Soumi Manna <soumi.manna@intel.com>
Signed-off-by: Soumi Manna <soumi.manna@intel.com>
AaronBallman
approved these changes
May 27, 2021
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, thank you!
Thank you for the reviews. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This patch
refactors FPGA function attribute [[intel::max_global_work_dim()]]
to better fit for community standards.
refactors the way we handled duplicate attributes and
mutually exclusive attributes logic when present on a given declaration.
handles redeclarations or template instantiations properly.
adds tests
Before the refactoring patch, we silently accepted this test case below:
struct TRIFuncObjBad {
[[intel::max_work_group_size(8, 8, 8)]]
[[cl::reqd_work_group_size(4, 4, 4)]]
[[intel::max_global_work_dim(0)]]
void operator()() const {}
};
This PR fixes the problem.
Signed-off-by: Soumi Manna soumi.manna@intel.com