[SYCL][FPGA] Add support for loop count attribute.#3438
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.
LGTM. @AaronBallman, could you please take a look at the support? Thanks.
AaronBallman
left a comment
There was a problem hiding this comment.
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.
| 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.
| 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.
LGTM aside from a super small grammar nit with the documentation.
Signed-off-by: Zahira Ammarguellat <zahira.ammarguellat@intel.com>
Signed-off-by: Zahira Ammarguellat <zahira.ammarguellat@intel.com>
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.