-
Notifications
You must be signed in to change notification settings - Fork 96
[SYCLomatic] Add braces around kernel call that use root-group #2398
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
intwanghao
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
| // CHECK-NEXT: exp_props, [=](sycl::nd_item<3> item_ct1) { | ||
| // CHECK-NEXT: kernel(item_ct1); | ||
| // CHECK-NEXT: }); | ||
| // CHECK-NEXT: } |
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.
if there is only one kernel in the code block, then no need to insert {}.
| int main() { | ||
| // CHECK: auto exp_props = sycl::ext::oneapi::experimental::properties{sycl::ext::oneapi::experimental::use_root_sync}; | ||
| // CHECK: { | ||
| // CHECK-NEXT: auto exp_props = sycl::ext::oneapi::experimental::properties{sycl::ext::oneapi::experimental::use_root_sync}; |
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.
can we inline the exp_props in parallel_for?
| int main() { | ||
| // CHECK: auto exp_props = sycl::ext::oneapi::experimental::properties{sycl::ext::oneapi::experimental::use_root_sync}; | ||
| // CHECK: { | ||
| // CHECK-NEXT: auto exp_props = sycl::ext::oneapi::experimental::properties{sycl::ext::oneapi::experimental::use_root_sync}; |
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.
How about insert the exp_pros when on demand? In this case, it is not required.
Signed-off-by: Wang, Yihan <[email protected]>
eb207ff to
c6eb0ea
Compare
No description provided.