-
Notifications
You must be signed in to change notification settings - Fork 14.8k
[NFC][Offload] Add missing maps to OpenMP offloading tests. #153103
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -66,8 +66,9 @@ void zoo() { | |
short **xpp = &xp[0]; | ||
|
||
x[1] = 111; | ||
#pragma omp target data map(tofrom : xpp[1][1]) use_device_addr(xpp[1][1]) | ||
#pragma omp target has_device_addr(xpp[1][1]) | ||
#pragma omp target data map(tofrom : xpp[1][1]) map(xpp[1]) \ | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
The same is present in OpenMP 6.0 as well. It is supposed to apply to array-elements/pointer-dereferences etc. as well. That is to be clarified in a future version of OpenMP). |
||
use_device_addr(xpp[1]) | ||
#pragma omp target has_device_addr(xpp[1]) | ||
{ | ||
xpp[1][1] = 222; | ||
// CHECK: 222 | ||
|
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.
For pointer-attachment on
V1.Data
to trigger, we need tomap(V1.Data[0:0])
. Otherwise, the implicitmap(V1)
will causeV1.Data
to retain the host pointer in the target region.