-
Notifications
You must be signed in to change notification settings - Fork 788
[SYCL][FPGA] Refactor [[intel::max_work_group_size()]] attribute implementation #5392
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: Soumi Manna <soumi.manna@intel.com>
Signed-off-by: Soumi Manna <soumi.manna@intel.com>
I will refactor "reqd_work_group_size" in a separate patch to avoid big patch here for better code-reviews. @AaronBallman, could you please provide some feedback on the implementation. I have separated support for "max_work_group_size" that was previously handled together with "reqd_work_group_size" attribute. 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>
Signed-off-by: Soumi Manna <soumi.manna@intel.com>
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 is just a suggestion; you can decide if this reads better or if you want to retain the enum with three states better.
I am fine with it, but feel that this simplifies it at least for this case. Maybe keeping three states makes sense if this routine will generalized?
Signed-off-by: Soumi Manna <soumi.manna@intel.com>
Thanks @premanandrao for the suggestion. I agree with you that this simplifies it at least for this case and reads better. I do not think we need to have enum with three states here. One state is kind of unused. So, returning true/false from the static bool function would be sufficient for this case. I have named the static bool function "InvalidWorkGroupSizeAttrs" so that i can reuse this later for reqd_work_group_size attribute refactorization work that i plan to do it after this PR. |
Signed-off-by: Soumi Manna <soumi.manna@intel.com>
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.
A fix to the comment, but otherwise looks good.
Signed-off-by: Soumi Manna <soumi.manna@intel.com>
Thank you for the reviews everyone! |
@bader, can this PR be merged? I have an approval and all checks have passed. Thanks |
Shouldn't we get approval from @AaronBallman? |
Sorry I missed that. Yes, Agreed Ping @AaronBallman |
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>
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.
Assuming CI passes, LGTM
Thanks Aaron for the reviews. |
Thank you for the reviews! |
…te arguments check If the [[intel::max_work_group_size(X, Y, Z)]] attribute is specified on a declaration along with [[sycl::reqd_work_group_size(X1, Y1, Z1)]] attribute, this patch checks if values of reqd_work_group_size arguments are equal or less than values of max_work_group_size attribute arguments. Some of the test cases were missed during refactoring work with PGA function attribute [[intel::max_work_group_size()]] on intel#5392 This patch fixes them. Signed-off-by: Soumi Manna <soumi.manna@intel.com>
…te arguments check (#5592) If the [[intel::max_work_group_size(X, Y, Z)]] attribute is specified on a declaration along with [[sycl::reqd_work_group_size(X1, Y1, Z1)]] attribute, this patch checks if values of reqd_work_group_size arguments are equal or less than values of max_work_group_size attribute arguments. Some of the test cases were missed during refactoring work with PGA function attribute [[intel::max_work_group_size()]] on #5392 This patch adds the missing cases and fixes pulldown bug. Signed-off-by: Soumi Manna <soumi.manna@intel.com>
This patch
refactors FPGA function attribute [[intel::max_work_group_size()]]
to better fit for community standards and separates the attribute from
[[sycl::reqd_work_group_size()]] attribute implementation.
refactors the way we handled duplicate attributes and
mutually exclusive attributes logic with 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(4, 4, 4)]] void
operator()() const;
};
[[intel::max_global_work_dim(0)]]
void TRIFuncObjBad::operator()() const {}
This PR fixes the bug and closes #5449
Signed-off-by: Soumi Manna soumi.manna@intel.com