-
Notifications
You must be signed in to change notification settings - Fork 769
[SYCL] [FPGA] Add mutual diagnostic for num_simd_work_items attribute in conjunction with the reqd_work_group_size attribute #3170
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
… in conjunction with the reqd_work_group_size attribute This is a follow up comments on intel#2906 (comment) There is a rule on FPGA document that the num_simd_work_items attribute we specify must evenly divide the work-group size we specify for the reqd_work_group_size attribute, was missed during initial implemention of the num_simd_work_items attribute. OpenCL spelling for num_simd_work_items attribute supports this rule. This patch 1. addes support for mutual diagnostic in Sema for num_simd_work_items attribute interacting with reqd_work_group_size attribute. 2. addes tests 3. updates documenation about the num_simd_work_items attribute with the note and exmaples. Current implementation of SYCL attribute “num_simd_work_items” and “reqd_work_group_size” does not support this. 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.
I think we're likely missing related changes in SemaTemplateInstantiate.cpp -- basically, anywhere we defer a check because it may be instantiation dependent, we need to then do that checking when we actually instantiate the template.
Thanks @AaronBallman for the review. Could you please elaborate about this? Thanks. |
Sure! The
We're still looking at the argument as Does that help? |
@AaronBallman thanks for the explanation. I tried this test case. int foo(); template func<3.f> f; Another similar test case: int foo(); func<foo()+12>f; When I try to instantiate the template, say with if (const auto *ReqdWorkGroupSize = if (const auto *SYCLIntelNumSimdWorkItems = This is a valid example but currently fails with assertion: template I think this is the issue you are trying to explain here. Please correct me if i miss something. |
That looks like the case I'd expect to see fail, yes. Another test I think might likely fail in a similar way is:
|
This is a rebase to apply PR#3169 |
Signed-off-by: Soumi Manna <soumi.manna@intel.com>
Signed-off-by: Soumi Manna <soumi.manna@intel.com>
This seems to be an existing issue. The same problem happens if we use max_work_group_size or SYCLIntelMaxGlobalWorkDimAttr. I am planning to cover them in a separate PR so that i can address all of the impacted attributes. Currently tests related to this PR do not cause assertion and compile without any diagnostic. I have restricted all diagnostics for template function now. @AaronBallman, is that OK for you? |
I think that's fine, but I think we should coordinate our refactoring efforts because you, @elizabethandrews, and I are all working in the same general areas and that's causing a bit of problems getting this code cleaned up (hard to clean up code other people are changing to add more reliances on). I'll type up some thoughts on this and start an email discussion so we can all try to get on the same page with a long-term goal, and maybe we can find a good division of labor where we're less likely to cause merge conflicts for one another. |
Sure, I agree. |
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.
My comments are all NFC, so looks good to me!
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.
LGTM!
This is a follow up comments on #2906 (comment)
There is a rule on FPGA document that the num_simd_work_items attribute we specify must evenly divide
the work-group size we specify for the reqd_work_group_size attribute, was missed during initial
implementation of the num_simd_work_items attribute.
OpenCL spelling for num_simd_work_items attribute supports this rule.
Current implementation of SYCL attribute “num_simd_work_items” and “reqd_work_group_size” does not support this.
This patch
interacting with reqd_work_group_size attribute.
attribute with the note and examples.
Signed-off-by: Soumi Manna soumi.manna@intel.com