Re: [RFC PATCH] Coalesce host to device transfers in libgomp

2019-12-18 Thread Thomas Schwinge
Hi! On 2017-10-25T13:38:50+0200, Jakub Jelinek wrote: > --- libgomp/target.c.jj 2017-10-24 12:07:03.763759657 +0200 > +++ libgomp/target.c 2017-10-25 13:17:31.608975390 +0200 > +/* Return true for mapping kinds which need to copy data from the > + host to device for regions that weren't

Re: [RFC PATCH] Coalesce host to device transfers in libgomp

2019-05-23 Thread Jakub Jelinek
On Thu, May 23, 2019 at 04:40:14PM +0200, Thomas Schwinge wrote: > Hi! > > On Tue, 24 Oct 2017 11:55:27 +0200, Jakub Jelinek wrote: > > The following patch implements coalescing of transfers (only those that are > > copied into the freshly allocated device buffer) into one or multiple larger > >

Re: [RFC PATCH] Coalesce host to device transfers in libgomp

2019-05-23 Thread Thomas Schwinge
Hi! On Tue, 24 Oct 2017 11:55:27 +0200, Jakub Jelinek wrote: > The following patch implements coalescing of transfers (only those that are > copied into the freshly allocated device buffer) into one or multiple larger > transfers. The patch doesn't coalesce > 32KB transfers or transfers where >

Re: [RFC PATCH] Coalesce host to device transfers in libgomp

2018-12-09 Thread Thomas Schwinge
Hi! On Thu, 6 Dec 2018 18:57:31 +0100, Jakub Jelinek wrote: > On Thu, Dec 06, 2018 at 06:54:20PM +0100, Thomas Schwinge wrote: > > On Thu, 6 Dec 2018 18:18:56 +0100, Jakub Jelinek wrote: > > > On Thu, Dec 06, 2018 at 06:01:48PM +0100, Thomas Schwinge wrote: > > > > While reviewing Chung-Lin's >

Re: [RFC PATCH] Coalesce host to device transfers in libgomp

2018-12-06 Thread Jakub Jelinek
On Thu, Dec 06, 2018 at 06:54:20PM +0100, Thomas Schwinge wrote: > On Thu, 6 Dec 2018 18:18:56 +0100, Jakub Jelinek wrote: > > On Thu, Dec 06, 2018 at 06:01:48PM +0100, Thomas Schwinge wrote: > > > While reviewing Chung-Lin's > > > "[PATCH

Re: [RFC PATCH] Coalesce host to device transfers in libgomp

2018-12-06 Thread Thomas Schwinge
Hi Jakub! On Thu, 6 Dec 2018 18:18:56 +0100, Jakub Jelinek wrote: > On Thu, Dec 06, 2018 at 06:01:48PM +0100, Thomas Schwinge wrote: > > While reviewing Chung-Lin's > > "[PATCH 4/6, > > OpenACC, libgomp] Async re-work, libgomp/target.c ch

Re: [RFC PATCH] Coalesce host to device transfers in libgomp

2018-12-06 Thread Jakub Jelinek
On Thu, Dec 06, 2018 at 06:01:48PM +0100, Thomas Schwinge wrote: > While reviewing Chung-Lin's > "[PATCH 4/6, > OpenACC, libgomp] Async re-work, libgomp/target.c changes", I noticed the > following unrelated hunk. Is that intentional or ju

Re: [RFC PATCH] Coalesce host to device transfers in libgomp

2018-12-06 Thread Thomas Schwinge
Hi Jakub! While reviewing Chung-Lin's "[PATCH 4/6, OpenACC, libgomp] Async re-work, libgomp/target.c changes", I noticed the following unrelated hunk. Is that intentional or just an oversight that it hasn't been included in your "gomp_coa

Re: [RFC PATCH] Coalesce host to device transfers in libgomp

2017-10-25 Thread Jakub Jelinek
On Tue, Oct 24, 2017 at 08:39:13PM +0300, Alexander Monakov wrote: > > +struct gomp_map_cache > > +{ > > + void *buf; > > + struct target_mem_desc *tgt; > > + size_t *chunks; > > + long chunk_cnt; > > + long use_cnt; > > +}; > > Would really appreciate comments for meaning of fields here. Al

Re: [RFC PATCH] Coalesce host to device transfers in libgomp

2017-10-24 Thread Jakub Jelinek
On Tue, Oct 24, 2017 at 08:39:13PM +0300, Alexander Monakov wrote: > On Tue, 24 Oct 2017, Jakub Jelinek wrote: > > loop transfering the addresses or firstprivate_int values to the device > > - where we issued mapnum host2dev transfers each just pointer-sized > > when we could have just prepared all

Re: [RFC PATCH] Coalesce host to device transfers in libgomp

2017-10-24 Thread Alexander Monakov
On Tue, 24 Oct 2017, Jakub Jelinek wrote: > > Why did you chose the 32KB and 4KB limits? I wonder if that would have > > any impact on firstprivate_int values. If this proves to be effective, > > it seems like we should be able to eliminate GOMP_MAP_FIRSTPRIVATE_INT > > altogether. > > The thing i

Re: [RFC PATCH] Coalesce host to device transfers in libgomp

2017-10-24 Thread Alexander Monakov
On Tue, 24 Oct 2017, Jakub Jelinek wrote: > loop transfering the addresses or firstprivate_int values to the device > - where we issued mapnum host2dev transfers each just pointer-sized > when we could have just prepared all the pointers in an array and host2dev > copy them all together. Can you p

Re: [RFC PATCH] Coalesce host to device transfers in libgomp

2017-10-24 Thread Jakub Jelinek
On Tue, Oct 24, 2017 at 08:47:39AM -0700, Cesar Philippidis wrote: > On 10/24/2017 02:55 AM, Jakub Jelinek wrote: > > > Poeple from NVidia reported privately unexpected amount of host2dev > > transfers for #pragma omp target*. > > Did they mention which program they were testing? No. Just the n

Re: [RFC PATCH] Coalesce host to device transfers in libgomp

2017-10-24 Thread Cesar Philippidis
On 10/24/2017 02:55 AM, Jakub Jelinek wrote: > Poeple from NVidia reported privately unexpected amount of host2dev > transfers for #pragma omp target*. Did they mention which program they were testing? > The code even had comments like: >/* FIXME: Perhaps add some smarts, lik

[RFC PATCH] Coalesce host to device transfers in libgomp

2017-10-24 Thread Jakub Jelinek
Hi! Poeple from NVidia reported privately unexpected amount of host2dev transfers for #pragma omp target*. The code even had comments like: /* FIXME: Perhaps add some smarts, like if copying several adjacent fields from host to target, use some