-
Notifications
You must be signed in to change notification settings - Fork 801
[SYCL][FPGA] Add support for loop count attribute. #3438
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: Zahira Ammarguellat <zahira.ammarguellat@intel.com>
Signed-off-by: Zahira Ammarguellat <zahira.ammarguellat@intel.com>
Signed-off-by: Zahira Ammarguellat <zahira.ammarguellat@intel.com>
Signed-off-by: Zahira Ammarguellat <zahira.ammarguellat@intel.com>
Signed-off-by: Zahira Ammarguellat <zahira.ammarguellat@intel.com>
Signed-off-by: Zahira Ammarguellat <zahira.ammarguellat@intel.com>
Signed-off-by: Zahira Ammarguellat <zahira.ammarguellat@intel.com>
|
I need to write the loop_count_min and loop_count_max too. I am trying to find out if there is a way to represent this attribute as a single one, loop_count with option min, max, avg instead of having an entry for each one. |
I think you can use Accessors here like Same for Max or Avg This was you can represent this attribute as a single one. @AaronBallman, what is your opinion? |
It looks like it is the way to go. |
Signed-off-by: Zahira Ammarguellat <zahira.ammarguellat@intel.com>
Yeah, I think that would be the right approach. |
Signed-off-by: Zahira Ammarguellat <zahira.ammarguellat@intel.com>
Signed-off-by: Zahira Ammarguellat <zahira.ammarguellat@intel.com>
|
@zahiraam, could you please update title and add brief summary about the support. Thanks. |
|
Review please? |
smanna12
left a comment
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. @AaronBallman, could you please take a look at the support? Thanks.
AaronBallman
left a comment
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.
Can you update the review title and description (this adds multiple attributes, none of which are named loop_count)?
| let Category = DocCatVariable; | ||
| let Heading = "intel::loop_count_min, intel::loop_count_max, intel::loop_count_avg"; | ||
| let Content = [{ | ||
| The "loop_count" attribute specifies the minimum, maximum, or average number of |
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 "loop_count" attribute specifies the minimum, maximum, or average number of | |
| The loop count attributes specify the minimum, maximum, or average number of |
Signed-off-by: Zahira Ammarguellat <zahira.ammarguellat@intel.com>
Signed-off-by: Zahira Ammarguellat <zahira.ammarguellat@intel.com>
clang/lib/CodeGen/CGLoopInfo.h
Outdated
| void setSYCLIntelFPGAVariantCount(const char *var, unsigned int C) { | ||
| StagedAttrs.SYCLIntelFPGAVariantCount.push_back({var, C}); |
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.
| void setSYCLIntelFPGAVariantCount(const char *var, unsigned int C) { | |
| StagedAttrs.SYCLIntelFPGAVariantCount.push_back({var, C}); | |
| void setSYCLIntelFPGAVariantCount(const char *Var, unsigned int Count) { | |
| StagedAttrs.SYCLIntelFPGAVariantCount.push_back({Var, Count}); |
Signed-off-by: Zahira Ammarguellat <zahira.ammarguellat@intel.com>
AaronBallman
left a comment
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 aside from a super small grammar nit with the documentation.
Signed-off-by: Zahira Ammarguellat <zahira.ammarguellat@intel.com>
AaronBallman
left a comment
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: Zahira Ammarguellat <zahira.ammarguellat@intel.com>
premanandrao
left a comment
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
The original implementation of this attribute in intel#3438, did not support the [[intel::loop_count()]] attribute spelling. This patch adds support for that spelling. Signed-off-by: Soumi Manna <soumi.manna@intel.com>
The original implementation of this attribute in #3438, did not support the [[intel::loop_count()]] attribute spelling. This patch adds support for that spelling. Signed-off-by: Soumi Manna <soumi.manna@intel.com>
Brand-new spec: #12497 Signed-off-by: Dmitry Sidorov <dmitry.sidorov@intel.com> Co-authored-by: Viktoria Maximova <viktoria.maksimova@intel.com> Original commit: KhronosGroup/SPIRV-LLVM-Translator@60d78aa6d1d98cb
This patch adds support of loop_min, loop_max and loop_avg attributes. They specify the minimum, maximum, or average number of iterations of a for loop.