Skip to content

[SYCL][FPGA] Enable uses_global_work_offset attribute #1010

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Merged
merged 3 commits into from
Jan 21, 2020

Conversation

vmaksimo
Copy link
Contributor

@vmaksimo vmaksimo commented Jan 15, 2020

uses_global_work_offset attribute applies to a device function/lambda function or function call operator. Valid values are 0 and 1.
If value >1 is specified as an argument, we warn user that it will be adjusted to 1. As attribute is not ignored in this case and it does not match any existing diagnostic group, the new AdjustedAttributes group was added.

Signed-off-by: Viktoria Maksimova <viktoria.maksimova@intel.com>
Signed-off-by: Viktoria Maksimova <viktoria.maksimova@intel.com>
Signed-off-by: Viktoria Maksimova <viktoria.maksimova@intel.com>
/*StrictlyUnsigned=*/true))
return;
if (Enabled > 1)
S.Diag(Attr.getLoc(), diag::warn_boolean_attribute_argument_is_not_valid)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you need to reset Enabled to 1 if the warning is generated, or will that be handled in the generation?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No need, as it is handled in code generation - CodeGenFunction.cpp:674

@intel intel deleted a comment from MrSidims Jan 17, 2020
@bader
Copy link
Contributor

bader commented Jan 20, 2020

Please, add justification for adjusted-attributes diagnostics group to the PR description or code comments. The reason for adding a new group is not clear.

@vmaksimo
Copy link
Contributor Author

Please, add justification for adjusted-attributes diagnostics group to the PR description or code comments. The reason for adding a new group is not clear.

updated PR description

@bader
Copy link
Contributor

bader commented Jan 21, 2020

As attribute is not ignored in this case and it does not match any existing diagnostic group, the new AdjustedAttributes group was added.

Why do we need put the attribute to any group?

@vmaksimo
Copy link
Contributor Author

As attribute is not ignored in this case and it does not match any existing diagnostic group, the new AdjustedAttributes group was added.

Why do we need put the attribute to any group?

There is a requirement that all new warnings should be associated with -W flag (see test/Misc/warning-flag.c). It is done by adding new warnings to some diagnostic group.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants