-
Notifications
You must be signed in to change notification settings - Fork 807
[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 <[email protected]>
Signed-off-by: Zahira Ammarguellat <[email protected]>
Signed-off-by: Zahira Ammarguellat <[email protected]>
Signed-off-by: Zahira Ammarguellat <[email protected]>
Signed-off-by: Zahira Ammarguellat <[email protected]>
Signed-off-by: Zahira Ammarguellat <[email protected]>
Signed-off-by: Zahira Ammarguellat <[email protected]>
Signed-off-by: Zahira Ammarguellat <[email protected]>
Signed-off-by: Zahira Ammarguellat <[email protected]>
Signed-off-by: Zahira Ammarguellat <[email protected]>
Signed-off-by: Zahira Ammarguellat <[email protected]>
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 <[email protected]>
Yeah, I think that would be the right approach. |
Signed-off-by: Zahira Ammarguellat <[email protected]>
Signed-off-by: Zahira Ammarguellat <[email protected]>
Signed-off-by: Zahira Ammarguellat <[email protected]>
@zahiraam, could you please update title and add brief summary about the support. Thanks. |
Review please? |
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.
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 <[email protected]>
Signed-off-by: Zahira Ammarguellat <[email protected]>
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 <[email protected]>
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 <[email protected]>
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 <[email protected]>
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 <[email protected]>
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 <[email protected]>
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.