-
Notifications
You must be signed in to change notification settings - Fork 791
[SYCL] Add template parameter support for no_global_work_offset attribute #2839
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
[SYCL] Add template parameter support for no_global_work_offset attribute #2839
Conversation
…bute This patch adds support for template parameter on [[intel:: no_global_work_offset())]] attribute where valid values are 0 and 1 and attribute parameter is optional, so [[intelfpga::no_global_work_offset]] means the same as [[intelfpga::no_global_work_offset(1)]]. updates sema/codegen tests with mock headers on device. uses existing function "sema::addIntelSYCLSingleArgFunctionAttr" from other single argument function attributes such as num_simd_work_items, max_global_work_dim, and intel_reqd_sub_group_size to avoid source codes duplication and reuse for the template parameter support. Signed-off-by: Soumi Manna <[email protected]>
Signed-off-by: Soumi Manna <[email protected]>
Signed-off-by: Soumi Manna <[email protected]>
Signed-off-by: Soumi Manna <[email protected]>
clang/test/SemaSYCL/sycl-device-intel-fpga-no-global-work-offset.cpp
Outdated
Show resolved
Hide resolved
Signed-off-by: Soumi Manna <[email protected]>
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. Thank you.
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.
Some drive-by comments as the review happened to catch my attention.
Signed-off-by: Soumi Manna <[email protected]>
Signed-off-by: Soumi Manna <[email protected]>
Signed-off-by: Soumi Manna <[email protected]>
Signed-off-by: Soumi Manna <[email protected]>
Signed-off-by: Soumi Manna <[email protected]>
Signed-off-by: Soumi Manna <[email protected]>
clang/test/SemaSYCL/sycl-device-intel-fpga-no-global-work-offset.cpp
Outdated
Show resolved
Hide resolved
Signed-off-by: Soumi Manna <[email protected]>
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.
Thanks for the discussion, the changes LGTM!
Thanks @AaronBallman for the reviews and feedback. |
Can I get a code-reviews from @Fznamznon / @premanandrao / @elizabethandrews as code-owners? Thanks. |
Signed-off-by: Soumi Manna <[email protected]>
Thank you everyone for the review. |
This patch
adds support for template parameter on
[[intel:: no_global_work_offset())]] attribute where
valid values are 0 and 1. If 1, compiler doesn't
use the global work offset values for the device function.
If used without argument, value of 1 is set implicitly.
Attribute parameter is optional,
so [[intelfpga::no_global_work_offset]] means
the same as [[intelfpga::no_global_work_offset(1)]].
updates sema/codegen tests with mock headers on device.
uses existing function "sema::addIntelSYCLSingleArgFunctionAttr" from
other single argument function attributes such as num_simd_work_items,
max_global_work_dim, and intel_reqd_sub_group_size to avoid source
codes duplication and reuse the codes for the template parameter support.
Removes Bool argument "Enabled" from test and attr.td file since template
parameter covers functionality of "Enabled" parameter.
Signed-off-by: Soumi Manna [email protected]