public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug middle-end/92929] OpenACC/OpenMP 'target' 'exit data'/'update' optimizations
[not found] <bug-92929-4@http.gcc.gnu.org/bugzilla/>
@ 2020-06-08 13:08 ` jules at gcc dot gnu.org
2020-07-06 16:19 ` tschwinge at gcc dot gnu.org
` (3 subsequent siblings)
4 siblings, 0 replies; 5+ messages in thread
From: jules at gcc dot gnu.org @ 2020-06-08 13:08 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92929
--- Comment #7 from jules at gcc dot gnu.org ---
Test case & further discussion in:
https://gcc.gnu.org/pipermail/gcc-patches/2020-June/547424.html
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug middle-end/92929] OpenACC/OpenMP 'target' 'exit data'/'update' optimizations
[not found] <bug-92929-4@http.gcc.gnu.org/bugzilla/>
2020-06-08 13:08 ` [Bug middle-end/92929] OpenACC/OpenMP 'target' 'exit data'/'update' optimizations jules at gcc dot gnu.org
@ 2020-07-06 16:19 ` tschwinge at gcc dot gnu.org
2020-07-06 16:37 ` tschwinge at gcc dot gnu.org
` (2 subsequent siblings)
4 siblings, 0 replies; 5+ messages in thread
From: tschwinge at gcc dot gnu.org @ 2020-07-06 16:19 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92929
Thomas Schwinge <tschwinge at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|--- |10.0
Ever confirmed|0 |1
Last reconfirmed| |2020-07-06
Status|UNCONFIRMED |NEW
Depends on| |94635
--- Comment #8 from Thomas Schwinge <tschwinge at gcc dot gnu.org> ---
In addition to r277631 "Fortran/OpenMP] Don't create "alloc:" for 'target exit
data'", as shown in the PR94635 commit af557050fd011a03d21dc26b31959033061a0443
"[OpenMP] Fix 'omp exit data' for Fortran arrays (PR 94635)", and commit
9f0f7da9aa98eec28b4e5e34ade0aa0028df161d "[OpenMP] Fix 'omp exit data' for
Fortran arrays (PR 94635)", this is not only an optimization but also a
correctness issue.
The OpenMP cases now presumably have been addressed, but OpenACC not yet?
Referenced Bugs:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94635
[Bug 94635] [OpenMP][Offloading] mapping with alloc/delete followed by
map(from/tofrom:) fails
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug middle-end/92929] OpenACC/OpenMP 'target' 'exit data'/'update' optimizations
[not found] <bug-92929-4@http.gcc.gnu.org/bugzilla/>
2020-06-08 13:08 ` [Bug middle-end/92929] OpenACC/OpenMP 'target' 'exit data'/'update' optimizations jules at gcc dot gnu.org
2020-07-06 16:19 ` tschwinge at gcc dot gnu.org
@ 2020-07-06 16:37 ` tschwinge at gcc dot gnu.org
2020-07-14 12:51 ` tschwinge at gcc dot gnu.org
2022-01-09 0:34 ` pinskia at gcc dot gnu.org
4 siblings, 0 replies; 5+ messages in thread
From: tschwinge at gcc dot gnu.org @ 2020-07-06 16:37 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92929
--- Comment #9 from Thomas Schwinge <tschwinge at gcc dot gnu.org> ---
(In reply to Thomas Schwinge from comment #0)
> As of Tobias' recent r277631 "Fortran/OpenMP] Don't create "alloc:" for
> 'target exit data'",
> <http://mid.mail-archive.com/7a5f39e8-a33b-048a-f9c1-
> 1355b941771e@codesourcery.com>, this is done for Fortran OpenMP '!$omp
> target exit data'/'!$omp target update', but not for OpenACC '!$acc exit
> data'/'!$acc update'; see 'gcc/gimplify.c:gimplify_scan_omp_clauses':
>
> /* For Fortran, not only the pointer to the data is mapped but also
> the address of the pointer, the array descriptor etc.; for
> 'exit data' - and in particular for 'delete:' - having an 'alloc:'
> does not make sense. Likewise, for 'update' only transferring the
> data itself is needed as the rest has been handled in previous
> directives. */
> if ((code == OMP_TARGET_EXIT_DATA || code == OMP_TARGET_UPDATE)
> && (OMP_CLAUSE_MAP_KIND (c) == GOMP_MAP_POINTER
> || OMP_CLAUSE_MAP_KIND (c) == GOMP_MAP_TO_PSET))
> remove = true;
Is it actually correct to remove 'GOMP_MAP_TO_PSET' for 'OMP_TARGET_UPDATE'?
Untested -- I'm thinking of the following Fortran scenario:
arrays a1, a2
pointer p
[target] enter data(a1, a2)
p => a1
[target] enter data(p)
! creates persistent, visible device copy of 'p', initially pointing to
'a1'
p => a2
[target] update to(p)
! do we now still have 'p => a1' on the device, or 'p => a2'?
What is this '[target] update' to do? Just update the data pointed to, and
also/or only update the array descriptor on the device? If the latter, then
didn't get this broken by r277631 (cited above)? Again: unverified.
But (also unverified), would 'libgomp/target.c:gomp_update' actually do the
right thing for 'GOMP_MAP_TO_PSET', given the current 'GOMP_MAP_COPY_TO_P'
definition?
Am I confused, or the code?
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug middle-end/92929] OpenACC/OpenMP 'target' 'exit data'/'update' optimizations
[not found] <bug-92929-4@http.gcc.gnu.org/bugzilla/>
` (2 preceding siblings ...)
2020-07-06 16:37 ` tschwinge at gcc dot gnu.org
@ 2020-07-14 12:51 ` tschwinge at gcc dot gnu.org
2022-01-09 0:34 ` pinskia at gcc dot gnu.org
4 siblings, 0 replies; 5+ messages in thread
From: tschwinge at gcc dot gnu.org @ 2020-07-14 12:51 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92929
--- Comment #10 from Thomas Schwinge <tschwinge at gcc dot gnu.org> ---
(In reply to Thomas Schwinge from comment #4)
> The recent r279626 "OpenACC 2.6 deep copy: middle-end parts" contains
> changes related to this
... some of which have now gotten reverted in recent commit
g:b20097c65d2e74b1901fba1c55c77f0407e542d2 "openacc: Don't strip
TO_PSET/POINTER for enter/exit data".
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug middle-end/92929] OpenACC/OpenMP 'target' 'exit data'/'update' optimizations
[not found] <bug-92929-4@http.gcc.gnu.org/bugzilla/>
` (3 preceding siblings ...)
2020-07-14 12:51 ` tschwinge at gcc dot gnu.org
@ 2022-01-09 0:34 ` pinskia at gcc dot gnu.org
4 siblings, 0 replies; 5+ messages in thread
From: pinskia at gcc dot gnu.org @ 2022-01-09 0:34 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92929
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|10.0 |---
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2022-01-09 0:34 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <bug-92929-4@http.gcc.gnu.org/bugzilla/>
2020-06-08 13:08 ` [Bug middle-end/92929] OpenACC/OpenMP 'target' 'exit data'/'update' optimizations jules at gcc dot gnu.org
2020-07-06 16:19 ` tschwinge at gcc dot gnu.org
2020-07-06 16:37 ` tschwinge at gcc dot gnu.org
2020-07-14 12:51 ` tschwinge at gcc dot gnu.org
2022-01-09 0:34 ` pinskia at gcc dot gnu.org
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).