-
Notifications
You must be signed in to change notification settings - Fork 769
[SYCL] Fix assertion for sycl keyword using without -fsycl option. #445
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
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.
I looked into this as well, this is correct.
|
This problem isn't limited to __constant. It'll happen with anything defined with KEYSYCL. __read_only, __write_only, and __pipe have the same problem. @jyu2-git you likely need to just update the test to use one of those other keywords instead. |
I don't know if I have updated source. But it seems after 358, we don't defined any KEYSYCL keyword in TokenKinds.def. If that is the case, we need remove KEYSYCL for all use. If not, we still need to remove KEYSYCL form KEYALLCXX |
I think |
Could you also add [SYCL] tag to the commit message title, please? |
Thanks I will add by end of day. The machine I am using currently used by other. So can not do now. |
bd264a5
to
f44646c
Compare
This is to fix assertion when clang compile C++ head file without -fsycl The problem is when __constant (one of sycl keyworld) used without -fsycl option, the __contant should not be keyword and keyword status should be KS_Disable. But it is wrongly set to KS_Future. The root problem is the KEYSYCL is add to KEYALLCXX: KEYALLCXX = KEYSYCL | KEYCXX | KEYCXX11 | KEYCXX2A It seems, we want KEYSYCL to be part of feature of C++. But which C++ should belong: C++11 or C++2a? (for example KEYCX2A... vs concept) For now we should just use -fsycl option to control this. Signed-off-by: Yu <jennifer.yu@intel.com>
f44646c
to
f74132e
Compare
None of these are actual SYCL keywords. They are just implementation details. |
Decision is needed from sycl team. |
I think (but could be wrong) @keryell was just giving an opinion for some interesting future direction as I imagine it's outside of the scope of this pull request probably. As I think the annotate attribute might need some tweaking to be fully usable in all contexts; at least from my experience with it anyway. And I imagine some of the code gen/other components relating to the __pipe keyword would have to change. But having annotate working nicely would be pretty useful for passing arbitrary data down to backends/opt passes and could be useful to make some generic way to express SYCL extensions/attributes. So some discussion on it from the SYCL team may be interesting! |
Thanks @agozillon. Should we get this in for now? Thanks. Jennifer |
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.
Minor comment.
Please, update the description. Also it might be useful to test that clang emits diagnostic if we try to use |
Thanks all, update comment |
This is to fix assertion when clang compile C++ head file without -fsycl
The problem is when __pipe (one of sycl keyworld) used without
-fsycl
option, the __pipe should not be keyword and keyword status should be
KS_Disable. But it is wrongly set to KS_Future.
The root problem is the KEYSYCL is add to KEYALLCXX:
KEYALLCXX = KEYSYCL | KEYCXX | KEYCXX11 | KEYCXX2A
It seems, we want KEYSYCL to be part of feature of C++. But which C++
should belong: C++11 or C++2a? (for example KEYCX2A... vs concept)
For now we should just use -fsycl option to control this.
Signed-off-by: Yu jennifer.yu@intel.com