Re: [PATCH] OpenACC reference count overhaul

2019-12-18 Thread Thomas Schwinge
Hi! On 2019-12-11T18:22:00+0100, I wrote: > On 2019-10-29T12:15:01+, Julian Brown wrote: >> I've removed the special-case handling >> of pointers in the enter/exit data code, and combined the >> gomp_acc_remove_pointer code (which now iterated over mappings >> one-at-a-time anyway) with the l

Re: 'find_group_last' (was: [PATCH] OpenACC reference count overhaul)

2019-12-18 Thread Julian Brown
On Wed, 18 Dec 2019 10:18:14 +0100 Thomas Schwinge wrote: > Hi Julian! > > Thanks for walking me through this. > > On 2019-12-14T00:19:04+, Julian Brown > wrote: > > On Fri, 13 Dec 2019 16:25:25 +0100 > > Thomas Schwinge wrote: > >> On 2019-10-29T12:15:01+, Julian Brown > >> wrote:

Re: 'find_group_last' (was: [PATCH] OpenACC reference count overhaul)

2019-12-18 Thread Thomas Schwinge
Hi Julian! Thanks for walking me through this. On 2019-12-14T00:19:04+, Julian Brown wrote: > On Fri, 13 Dec 2019 16:25:25 +0100 > Thomas Schwinge wrote: >> On 2019-10-29T12:15:01+, Julian Brown >> wrote: >> > static int >> > -find_pointer (int pos, size_t mapnum, unsigned short *kind

Re: 'find_group_last' (was: [PATCH] OpenACC reference count overhaul)

2019-12-16 Thread Julian Brown
On Sat, 14 Dec 2019 00:19:04 + Julian Brown wrote: > On Fri, 13 Dec 2019 16:25:25 +0100 > Thomas Schwinge wrote: > > > Hi Julian! > > > > On 2019-10-29T12:15:01+, Julian Brown > > wrote: > > > static int > > > -find_pointer (int pos, size_t mapnum, unsigned short *kinds) > > > +fin

Re: 'find_group_last' (was: [PATCH] OpenACC reference count overhaul)

2019-12-13 Thread Julian Brown
On Fri, 13 Dec 2019 16:25:25 +0100 Thomas Schwinge wrote: > Hi Julian! > > On 2019-10-29T12:15:01+, Julian Brown > wrote: > > static int > > -find_pointer (int pos, size_t mapnum, unsigned short *kinds) > > +find_group_last (int pos, size_t mapnum, unsigned short *kinds) > > { > > - if (

'find_group_last' (was: [PATCH] OpenACC reference count overhaul)

2019-12-13 Thread Thomas Schwinge
Hi Julian! On 2019-10-29T12:15:01+, Julian Brown wrote: > On Mon, 21 Oct 2019 16:14:11 +0200 > Thomas Schwinge wrote: > >> On 2019-10-03T09:35:04-0700, Julian Brown >> wrote: >> > --- a/libgomp/oacc-parallel.c >> > +++ b/libgomp/oacc-parallel.c >> > @@ -56,12 +56,29 @@ find_pointer (int pos

Re: [PATCH] OpenACC reference count overhaul

2019-12-11 Thread Thomas Schwinge
Hi! On 2019-10-29T12:15:01+, Julian Brown wrote: > On Mon, 21 Oct 2019 16:14:11 +0200 > Thomas Schwinge wrote: >> On 2019-10-03T09:35:04-0700, Julian Brown >> wrote: >> > void >> > -gomp_acc_remove_pointer (void *h, size_t s, bool force_copyfrom, >> > int async, >> > - in

Re: [PATCH] OpenACC reference count overhaul

2019-12-10 Thread Chung-Lin Tang
On 2019/12/10 12:04 AM, Julian Brown wrote: I'm citing below the changes introducing 'gomp_remove_var_async', modelled similar to the existing 'gomp_unmap_vars_async'. Also for both these, do I understand correctly, that it's actually not the 'gomp_unref_tgt' that needs to be "delayed" via 'goa

PR92881 "[OpenACC] In async context, need to use 'gomp_remove_var_async' instead of 'gomp_remove_var'" (was: [PATCH] OpenACC reference count overhaul)

2019-12-10 Thread Thomas Schwinge
Hi Julian! On 2019-12-09T15:04:15+, Julian Brown wrote: > On Mon, 9 Dec 2019 15:44:25 +0100 > Thomas Schwinge wrote: >> On 2019-10-03T09:35:04-0700, Julian Brown >> wrote: >> > --- a/libgomp/oacc-mem.c >> > +++ b/libgomp/oacc-mem.c >> >> > @@ -715,48 +684,34 @@ delete_copyout (unsigned f

[PR92116, PR92877] [OpenACC] Replace 'openacc.data_environ' by standard libgomp mechanics (was: [PATCH] OpenACC reference count overhaul)

2019-12-09 Thread Thomas Schwinge
Hi! \o/ Yay for the first split-out piece of the big "OpenACC reference count overhaul" going in: On 2019-10-29T12:15:01+, Julian Brown wrote: > On Mon, 21 Oct 2019 16:14:11 +0200 > Thomas Schwinge wrote: >> Remeber to look into "Potential null >> pointer deref

Re: [PATCH] OpenACC reference count overhaul

2019-12-09 Thread Julian Brown
On Mon, 9 Dec 2019 15:44:25 +0100 Thomas Schwinge wrote: > Hi Julian! > > On 2019-10-03T09:35:04-0700, Julian Brown > wrote: > > --- a/libgomp/oacc-mem.c > > +++ b/libgomp/oacc-mem.c > > > @@ -715,48 +684,34 @@ delete_copyout (unsigned f, void *h, size_t > > s, int async, const char *libfnna

Re: [PATCH] OpenACC reference count overhaul

2019-12-09 Thread Thomas Schwinge
Hi Julian! On 2019-10-03T09:35:04-0700, Julian Brown wrote: > --- a/libgomp/oacc-mem.c > +++ b/libgomp/oacc-mem.c > @@ -715,48 +684,34 @@ delete_copyout (unsigned f, void *h, size_t s, int > async, const char *libfnname) >if (f & FLAG_COPYOUT) > [...] > gomp_copy_dev2host (acc_

Re: [PATCH] OpenACC reference count overhaul

2019-11-22 Thread Julian Brown
On Sat, 9 Nov 2019 01:28:51 + Julian Brown wrote: > On Thu, 31 Oct 2019 19:11:57 +0100 > Thomas Schwinge wrote: > > > So that's not related to reference counting, needs to be discussed > > separately. > > > > ..., and while I do agree that the current code is a bit "strange" > > (returning

Re: [PATCH] OpenACC reference count overhaul

2019-11-08 Thread Julian Brown
On Thu, 31 Oct 2019 19:11:57 +0100 Thomas Schwinge wrote: > Hi Julian! > > On 2019-10-29T12:15:01+, Julian Brown > wrote: > > This is a new version of the patch which hopefully addresses all > > review comments. Further commentary below. > > Thanks, great, looking into that one -- I see

Re: [PATCH] OpenACC reference count overhaul

2019-10-31 Thread Thomas Schwinge
Hi Julian! On 2019-10-29T12:15:01+, Julian Brown wrote: > This is a new version of the patch which hopefully addresses all review > comments. Further commentary below. Thanks, great, looking into that one -- I see you're removing more and more special-case, strange code, replacing it with ge

Re: [PATCH] OpenACC reference count overhaul

2019-10-29 Thread Julian Brown
Hi! This is a new version of the patch which hopefully addresses all review comments. Further commentary below. On Mon, 21 Oct 2019 16:14:11 +0200 Thomas Schwinge wrote: > On 2019-10-03T09:35:04-0700, Julian Brown > wrote: > > This patch has been broken out of the patch supporting OpenACC 2.6

Re: [PATCH] OpenACC reference count overhaul

2019-10-23 Thread Thomas Schwinge
Hi Julian! On 2019-10-21T16:14:11+0200, I wrote: > On 2019-10-03T09:35:04-0700, Julian Brown wrote: >> This patch has been broken out of the patch supporting OpenACC 2.6 manual >> deep copy last posted here: >> >> https://gcc.gnu.org/ml/gcc-patches/2018-12/msg01084.html > > Thanks. I meanwhile

Re: [PATCH] OpenACC reference count overhaul

2019-10-21 Thread Thomas Schwinge
Hi! On 2019-10-03T09:35:04-0700, Julian Brown wrote: > This patch has been broken out of the patch supporting OpenACC 2.6 manual > deep copy last posted here: > > https://gcc.gnu.org/ml/gcc-patches/2018-12/msg01084.html Thanks. Remeber to look into "Potential nul

Re: [PATCH] OpenACC reference count overhaul

2019-10-21 Thread Julian Brown
p_dev unconditionally in several of the OpenACC API calls as we do is a bad idea -- it takes time linear to the number of mappings, with no way to avoid that overhead. But that's another matter.) Re-testing shows that the previously-regressing tests no longer regress, but I haven't yet made any changes t

Re: [PATCH] OpenACC reference count overhaul

2019-10-15 Thread Thomas Schwinge
Hi Julian! On 2019-10-03T09:35:04-0700, Julian Brown wrote: > This patch has been broken out of the patch supporting OpenACC 2.6 manual > deep copy last posted here: > > https://gcc.gnu.org/ml/gcc-patches/2018-12/msg01084.html Thanks. > a couple of > tests need fixing also Let's look at the

[PATCH] OpenACC reference count overhaul

2019-10-03 Thread Julian Brown
This patch has been broken out of the patch supporting OpenACC 2.6 manual deep copy last posted here: https://gcc.gnu.org/ml/gcc-patches/2018-12/msg01084.html As part of developing that patch, libgomp's OpenACC reference counting implementation proved to be somewhat inconsistent, especially whe