-
Notifications
You must be signed in to change notification settings - Fork 808
[SYCL] Add clang support for device_global #5597
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.
The functional part (under it I mean the changes described by design doc - https://github.com/intel/llvm/blob/sycl/sycl/doc/design/DeviceGlobal.md, i.e. everything except diagnostics) looks ok to me. Let's focus on that and add some testing:
- We need IR checking that
sycl-unique-id
is properly attached - We need Sema test checking that
device_global
variable can be captured to SYCL kernel.
- Check type of the variable, not the variable itself when checking presence of the attribute - Fix generation of LLVM IR attribute - Add the CodeGen test
@schittir, please fix the conflicts |
Done. |
I am not sure how to reproduce the failing "timed-out" tests. |
@schittir I am seeing same timeout test issue in other PR's (#4533 (comment)) I am seeing same timeout test issue in other PR's (#5782) Both failures are unrelated to your patch. |
Thank you, Soumi! |
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.
Changes LGTM.
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.
Looks ok to me. But I'd like to get approve from @elizabethandrews too.
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. Thanks!
ef0f5d0
@smanna12 @elizabethandrews could you please take a look again? |
Test failures unrelated to this PR. |
This patch implements the basic functionality and some diagnostics
for SYCL device_global attributes. The rest of the diagnostics are to
be added in a subsequent PR.
This patch includes:
[[__sycl_detail__::device_global]]
attribute and use it to checksome restrictions on variable declarations of device_global type
[[__sycl_detail__::global_variable_allowed]]
attribute and avoiddiagnosing err_sycl_restrict if variables of device_global type use it
"sycl-unique-id"
, an LLVM IR attribute, to provide a uniquestring identifier for each device global variable