[SYCL] Add template parameter support for max_global_work_dim attribute#2816
Merged
bader merged 14 commits intointel:syclfrom Nov 28, 2020
Merged
[SYCL] Add template parameter support for max_global_work_dim attribute#2816bader merged 14 commits intointel:syclfrom
bader merged 14 commits intointel:syclfrom
Conversation
This patch adds support for template parameter on [[intel::max_global_work_dim)]] attribute splits test/SemaSYCL/intel-max-global-work-dim.cpp to separate files for host compilation (test/SemaSYCL/intel-max-global-work-dim.cpp-host.cpp) and device compilation (test/SemaSYCL/intel-max-global-work-dim.cpp-device.cpp) updates sema/codegen tests with mock headers on device. uses existing function "addIntelSYCLSingleArgFunctionAttr" of other single argument function attributes such as num_simd_work_items and intel_reqd_sub_group_size source codes to avoid 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]>
smanna12
commented
Nov 25, 2020
Fznamznon
reviewed
Nov 25, 2020
Fznamznon
reviewed
Nov 25, 2020
Signed-off-by: Soumi Manna <[email protected]>
Signed-off-by: Soumi Manna <[email protected]>
Signed-off-by: Soumi Manna <[email protected]>
MrSidims
reviewed
Nov 26, 2020
Signed-off-by: Soumi Manna <[email protected]>
Signed-off-by: Soumi Manna <[email protected]>
MrSidims
previously approved these changes
Nov 27, 2020
Fznamznon
previously approved these changes
Nov 27, 2020
Signed-off-by: Soumi Manna <[email protected]>
Signed-off-by: Soumi Manna <[email protected]>
bader
requested changes
Nov 28, 2020
Signed-off-by: Soumi Manna <[email protected]>
17bb689 to
f11d097
Compare
Contributor
Author
|
Sorry for the force push (not able to publish commit by git push) |
Contributor
|
Please, remove Yes, it is removed now. |
Signed-off-by: Soumi Manna <[email protected]>
bader
approved these changes
Nov 28, 2020
smanna12
added a commit
to smanna12/llvm
that referenced
this pull request
Jan 25, 2021
Template parameter support was added for 1. [[intel::max_global_work_dim)]] attribute on intel#2816 2. [[intel::num_simd_work_items()]] attribute on intel#2510 3. [[intel::reqd_sub_group_size()]] attribute on intel#1807 This patch adds the following new test cases that were not there before to improve the support: 1. Test that checks wrong function template instantiation and ensures that the type is checked properly when instantiating from the template definition. 2. Test that checks expression is not a constant expression. 3. Test that checks expression is a constant expression. 4. Test that checks template parameter support on function. NOTE: No change in compiler. All new test cases have already been supported. Signed-off-by: Soumi Manna <[email protected]>
romanovvlad
pushed a commit
that referenced
this pull request
Jan 26, 2021
…3089) Template parameter support was added for 1. [[intel::max_global_work_dim)]] attribute on #2816 2. [[intel::num_simd_work_items()]] attribute on #2510 3. [[intel::reqd_sub_group_size()]] attribute on #1807 This patch adds the following new test cases that were not there before to improve the support: 1. Test that checks wrong function template instantiation and ensures that the type is checked properly when instantiating from the template definition. 2. Test that checks expression is not a constant expression. 3. Test that checks expression is a constant expression. 4. Test that checks template parameter support on function. NOTE: No change in compiler. All new test cases have already been supported. Signed-off-by: Soumi Manna <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This patch
adds support for template parameter on [[intel::max_global_work_dim)]] attribute
splits test/SemaSYCL/intel-max-global-work-dim.cpp to separate files for
host compilation (test/SemaSYCL/intel-max-global-work-dim.cpp-host.cpp) and
device compilation (test/SemaSYCL/intel-max-global-work-dim.cpp-device.cpp)
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
and intel_reqd_sub_group_size to avoid source codes duplication and
reuse for the template parameter support.
addresses special diagnostics in case the value of ‘max_global_work_dim’
attribute equals to 0, we shall ensure that if max_work_group_size and
reqd_work_group_size attributes exist, they hold equal values (1, 1, 1).
additionally updates sema/codegen tests for "reqd-sub-group-size" and
"num-simd-work-items" attributes with mock headers.
Signed-off-by: Soumi Manna [email protected]