-
Notifications
You must be signed in to change notification settings - Fork 14.3k
[Flang][OpenACC] Make async clause on data consistent with elsewhere #136866
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
in llvm#136610 we agreed that all async clauses on compute constructs should act as 'only 1 per device-type-group'. On `data`, it has the same specification language, and the same real requirements, so it seems sensible to make it work the same way.
@llvm/pr-subscribers-flang-semantics @llvm/pr-subscribers-openacc Author: Erich Keane (erichkeane) Changesin #136610 we agreed that all async clauses on compute constructs should act as 'only 1 per device-type-group'. On Full diff: https://github.com/llvm/llvm-project/pull/136866.diff 2 Files Affected:
diff --git a/flang/test/Semantics/OpenACC/acc-data.f90 b/flang/test/Semantics/OpenACC/acc-data.f90
index ac49532c495d5..473b91d555cea 100644
--- a/flang/test/Semantics/OpenACC/acc-data.f90
+++ b/flang/test/Semantics/OpenACC/acc-data.f90
@@ -187,6 +187,17 @@ program openacc_data_validity
!$acc data copy(aa) device_type(default) wait
!$acc end data
+ !ERROR: At most one ASYNC clause can appear on the DATA directive or in group separated by the DEVICE_TYPE clause
+ !$acc data copy(aa) async(async1) async(2)
+ !$acc end data
+
+ !$acc data copy(aa) async(async1) device_type(multicore) async(2) ! ok
+ !$acc end data
+
+ !ERROR: At most one ASYNC clause can appear on the DATA directive or in group separated by the DEVICE_TYPE clause
+ !$acc data copy(aa) async(async1) device_type(multicore) async(2) async(3)
+ !$acc end data
+
do i = 1, 100
!$acc data copy(aa)
!ERROR: CYCLE to construct outside of DATA construct is not allowed
diff --git a/llvm/include/llvm/Frontend/OpenACC/ACC.td b/llvm/include/llvm/Frontend/OpenACC/ACC.td
index 7dc97e6c89bee..d372fc221e4b4 100644
--- a/llvm/include/llvm/Frontend/OpenACC/ACC.td
+++ b/llvm/include/llvm/Frontend/OpenACC/ACC.td
@@ -284,11 +284,11 @@ def ACC_Atomic : Directive<"atomic"> {
// 2.6.5
def ACC_Data : Directive<"data"> {
let allowedOnceClauses = [
- VersionedClause<ACCC_Async, 32>,
VersionedClause<ACCC_If>,
VersionedClause<ACCC_Default>
];
let allowedClauses = [
+ VersionedClause<ACCC_Async, 32>,
VersionedClause<ACCC_DeviceType, 32>,
VersionedClause<ACCC_Wait, 32>
];
|
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
…lvm#136866) in llvm#136610 we agreed that all async clauses on compute constructs should act as 'only 1 per device-type-group'. On `data`, it has the same specification language, and the same real requirements, so it seems sensible to make it work the same way.
…lvm#136866) in llvm#136610 we agreed that all async clauses on compute constructs should act as 'only 1 per device-type-group'. On `data`, it has the same specification language, and the same real requirements, so it seems sensible to make it work the same way.
…lvm#136866) in llvm#136610 we agreed that all async clauses on compute constructs should act as 'only 1 per device-type-group'. On `data`, it has the same specification language, and the same real requirements, so it seems sensible to make it work the same way.
in #136610 we agreed that all async clauses on compute constructs should act as 'only 1 per device-type-group'. On
data
, it has the same specification language, and the same real requirements, so it seems sensible to make it work the same way.