-
Notifications
You must be signed in to change notification settings - Fork 809
[SYCL][FPGA] Allow safelen = 0 with ivdep attribute #6336
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
This patch allows safelen = 0 with ivdep attribute and emits suppressible warning when safelen of 0 or 1 is used Current behaviour: ivdep with safelen of 1 is allowed with no warning. Safelen of 0 causes an error. Desired behaviour: safelen of 1 and 0 should both be allowed Both should emit a warning. The warning should be suppressible with a -Wno flag. Justification: The safelen parameter of an ivdep will sometimes be set based on a template argument. It makes this type of code much cleaner if the setting of 0 is permitted. The warning for both the 0 and 1 case is helpful for users who might misunderstand the meaning of the safelen parameter and set a value of 1 (or possibly 0) thinking it will have some effect. The warning should be suppressible for those developers using the templated coding pattern described above who understand and accept that a safelen of 0 will have no effect. 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>
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.
Do we need to modify the docs?
Signed-off-by: Soumi Manna <soumi.manna@intel.com>
Thanks @premanandrao for review. I have updated docs as well. |
Signed-off-by: Soumi Manna <soumi.manna@intel.com>
Signed-off-by: Soumi Manna <soumi.manna@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 as far as that goes
Thanks @AaronBallman for reviews and feedbacks. |
Signed-off-by: Soumi Manna <soumi.manna@intel.com>
Signed-off-by: Soumi Manna <soumi.manna@intel.com>
|
Thank you for the reviews everyone. @intel/llvm-gatekeepers, this PR is ready for a merge. Thank you |
This patch allows safelen = 0 with ivdep attribute and emits suppressible warning when safelen of 0 or 1 is used
Current behaviour:
ivdep with safelen of 1 is allowed with no warning. Safelen of 0 causes an error.
Desired behaviour:
safelen of 1 and 0 should both be allowed but will have no effect on the loop.
Both should emit a warning. The warning should be suppressible with a -Wno flag.
Justification:
The safelen parameter of an ivdep will sometimes be set based on a template argument.
It makes this type of code much cleaner if the setting of 0 is permitted.
The warning for both the 0 and 1 case is helpful for users who might misunderstand the
meaning of the safelen parameter and set a value of 1 (or possibly 0) thinking it will have some effect.
The warning should be suppressible for those developers using the templated coding pattern described
above who understand and accept that a safelen of 0 will have no effect.
Signed-off-by: Soumi Manna soumi.manna@intel.com