Skip to content

[SYCL] Deny pragma spelling for SYCL-specific attributes #1815

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

Merged
merged 3 commits into from
Jun 5, 2020

Conversation

MrSidims
Copy link
Contributor

@MrSidims MrSidims commented Jun 4, 2020

Signed-off-by: Dmitry Sidorov [email protected]

@MrSidims
Copy link
Contributor Author

MrSidims commented Jun 4, 2020

TBH, I think we can also remove 'pragma spelling' for IntelReqdSubGroupSize as well. Yet I would prefer to leave ReqdWorkGroupSize attribute untouched. @erichkeane what do you think?

@erichkeane
Copy link
Contributor

TBH, I think we can also remove 'pragma spelling' for IntelReqdSubGroupSize as well. Yet I would prefer to leave ReqdWorkGroupSize attribute untouched. @erichkeane what do you think?

I don't have a strong opinion, but I don't know how heavy the pragma spelling for thoseis used for OpenCL. Do we know?

@MrSidims
Copy link
Contributor Author

MrSidims commented Jun 4, 2020

TBH, I think we can also remove 'pragma spelling' for IntelReqdSubGroupSize as well. Yet I would prefer to leave ReqdWorkGroupSize attribute untouched. @erichkeane what do you think?

I don't have a strong opinion, but I don't know how heavy the pragma spelling for thoseis used for OpenCL. Do we know?

Except of loop pragmas (unroll, ivdep etc), I have never encountered any pragmas in OpenCL.

@erichkeane
Copy link
Contributor

TBH, I think we can also remove 'pragma spelling' for IntelReqdSubGroupSize as well. Yet I would prefer to leave ReqdWorkGroupSize attribute untouched. @erichkeane what do you think?

I don't have a strong opinion, but I don't know how heavy the pragma spelling for thoseis used for OpenCL. Do we know?

Except of loop pragmas (unroll, ivdep etc), I have never encountered any pragmas in OpenCL.

Then I think we can remove the pragma spelling for IntelReqdGroupSize, and if there's a regression revert that part.

Whats the logic for wanting to leave ReqWorkGroupSize untouched?

@MrSidims
Copy link
Contributor Author

MrSidims commented Jun 4, 2020

Whats the logic for wanting to leave ReqWorkGroupSize untouched?

It's not Intel-specific attribute coming from OpenCL core spec itself.
At the same time quick googling showed me this:

No results found for "pragma reqd_work_group_size"

So it might be safe to remove the spelling for it as well.

@MrSidims
Copy link
Contributor Author

MrSidims commented Jun 4, 2020

Whats the logic for wanting to leave ReqWorkGroupSize untouched?

It's not Intel-specific attribute coming from OpenCL core spec itself.
At the same time quick googling showed me this:

No results found for "pragma reqd_work_group_size"

So it might be safe to remove the spelling for it as well.

@keryell may be you know if any of your customers use 'pragma' spelling?

@MrSidims MrSidims force-pushed the private/MrSidims/Pragma branch from 4683ee5 to 4fe536e Compare June 4, 2020 13:49
erichkeane
erichkeane previously approved these changes Jun 4, 2020
Copy link
Contributor

@erichkeane erichkeane left a comment

Choose a reason for hiding this comment

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

I'm happy with this. @keryell stop this if you think its necessary, otherwise I think we can just wait to see if it breaks anything.

@@ -136,14 +135,10 @@
// CHECK-NEXT: Pointer (SubjectMatchRule_record_not_is_union)
// CHECK-NEXT: ReleaseHandle (SubjectMatchRule_variable_is_parameter)
// CHECK-NEXT: RenderScriptKernel (SubjectMatchRule_function)
// CHECK-NEXT: ReqdWorkGroupSize (SubjectMatchRule_function)
Copy link
Contributor

@Fznamznon Fznamznon Jun 4, 2020

Choose a reason for hiding this comment

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

I don't have OpenCL background, so I cannot say is correct this change or not, but this particular attribute ReqdWorkGroupSize is OpenCL specific and it is added not by us.
Suggest you go through community with change for this attribute first.
I think you will get answers on your questions regarding this attribute.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ok, lets stick with leaving reqd_work_group_size attribute alone.

@bader bader linked an issue Jun 4, 2020 that may be closed by this pull request
@keryell
Copy link
Contributor

keryell commented Jun 5, 2020

@keryell may be you know if any of your customers use 'pragma' spelling?

Traditional Xilinx tools use a lot of #pragma but not the SYCL path.

While I am an advocate of no user-visible #pragma or attribute in SYCL to use only C++ decorative functions (think Python @decorator...) or classes instead, #pragma play even less nicely with C++ than attributes. :-( So at the end I do not have issues with having only attributes, as a less evil solution. :-)

Copy link
Contributor

@erichkeane erichkeane left a comment

Choose a reason for hiding this comment

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

Thanks for the discussion guys, I think we've bottomed out, so I'm approving.

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

Successfully merging this pull request may close these issues.

[SYCL][FE] Disable #pragma syntax for SYCL attributes
5 participants