-
Notifications
You must be signed in to change notification settings - Fork 13.5k
[OpenMP] Mapping of 'middle' structures chained through '->' does not work #141042
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
Comments
@llvm/issue-subscribers-openmp Author: Julian Brown (jtb20)
Consider this testcase:
Compiled with offloading to AMDGCN, this gives the following result:
The modification of (I used options If I set LIBOMPTARGET_DEBUG=5, we get a clue what's happening here:
For entries 1 & 2, the containing structure of > All map clause list items that share storage or have the same containing structure or containing array There's no indication, AFAICT, that this does not apply if the containing structure is "in the middle" of map expressions -- so there should be just three mappings generated here, and the middle one should be a block of size 8 containing both the I haven't examined the generated code for the offload region in detail -- I assume the I think both variants of the target directive in the above test should work, but definitely the commented-out version that maps the base |
Consider this testcase:
Compiled with offloading to AMDGCN, this gives the following result:
The modification of
v->s1->b
in the target region has been lost.(I used options
-fopenmp --offload-arch=gfx90a -fopenmp-version=60
)If I set LIBOMPTARGET_DEBUG=5, we get a clue what's happening here:
For entries 1 & 2, the containing structure of
v->s1
has not been aggregated properly, i.e. according to the spec (6.0, 7.9.6 map Clause):There's no indication, AFAICT, that this does not apply if the containing structure is "in the middle" of map expressions -- so there should be just three mappings generated here, and the middle one should be a block of size 8 containing both the
b
andc
elements ofs1
.I haven't examined the generated code for the offload region in detail -- I assume the
v->s1->b
field is not modified because the data is accessed through the wrong (other) pointer.I think both variants of the target directive in the above test should work, but definitely the commented-out version that maps the base
v[:1]
explicitly should. Neither works at present.The text was updated successfully, but these errors were encountered: