libgomp: Make GCC 5 OpenACC offloading executables work (was: Openacc launch API)

2016-04-20 Thread Thomas Schwinge
Hi! On Mon, 28 Sep 2015 15:38:57 -0400, Nathan Sidwell wrote: > On 09/24/15 04:40, Jakub Jelinek wrote: > > Iff GCC 5 compiled offloaded OpenACC/PTX code will always do host fallback > > anyway because of the incompatible PTX version I do agree that it's reasonable to require

libgomp external ABI prototypes maintenance (was: Openacc launch API)

2016-04-12 Thread Thomas Schwinge
Hi! On Mon, 28 Sep 2015 15:38:57 -0400, Nathan Sidwell wrote: > --- libgomp/libgomp_g.h (revision 228086) > +++ libgomp/libgomp_g.h (working copy) > @@ -222,9 +222,8 @@ extern void GOACC_data_start (int, size_ > extern void GOACC_data_end (void); > extern void

Re: Openacc launch API

2015-09-30 Thread Matthias Klose
On 30.09.2015 14:40, Bernd Schmidt wrote: On 09/30/2015 02:37 PM, Matthias Klose wrote: this broke the jit build. The following patch fixes the build for me. Ok to commit? Matthias 2015-09-30 Matthias Klose * jit-builtins.h Define DEF_FUNCTION_TYPE_VAR_6,

Re: Openacc launch API

2015-09-30 Thread Bernd Schmidt
On 09/30/2015 02:37 PM, Matthias Klose wrote: this broke the jit build. The following patch fixes the build for me. Ok to commit? Matthias 2015-09-30 Matthias Klose * jit-builtins.h Define DEF_FUNCTION_TYPE_VAR_6, remove DEF_FUNCTION_TYPE_VAR_11.

Re: Openacc launch API

2015-09-30 Thread Nathan Sidwell
On 09/30/15 08:37, Matthias Klose wrote: On 25.08.2015 15:29, Nathan Sidwell wrote: Jakub, This patch changes the launch API for openacc parallels. this broke the jit build. The following patch fixes the build for me. Ok to commit? Matthias 2015-09-30 Matthias Klose

Re: Openacc launch API

2015-09-30 Thread Matthias Klose
On 25.08.2015 15:29, Nathan Sidwell wrote: Jakub, This patch changes the launch API for openacc parallels. this broke the jit build. The following patch fixes the build for me. Ok to commit? Matthias 2015-09-30 Matthias Klose * jit-builtins.h Define

Re: Openacc launch API

2015-09-28 Thread Nathan Sidwell
On 09/24/15 04:40, Jakub Jelinek wrote: Iff GCC 5 compiled offloaded OpenACC/PTX code will always do host fallback anyway because of the incompatible PTX version, then why don't you just do goacc_save_and_set_bind (acc_device_host); fn (hostaddrs); goacc_restore_bind (); Committed

Re: Openacc launch API

2015-09-24 Thread Bernd Schmidt
On 09/24/2015 10:40 AM, Jakub Jelinek wrote: Iff GCC 5 compiled offloaded OpenACC/PTX code will always do host fallback anyway because of the incompatible PTX version, then why don't you just do goacc_save_and_set_bind (acc_device_host); fn (hostaddrs); goacc_restore_bind (); and

Re: Openacc launch API

2015-09-24 Thread Bernd Schmidt
On 09/24/2015 11:56 AM, Jakub Jelinek wrote: On Thu, Sep 24, 2015 at 11:50:56AM +0200, Bernd Schmidt wrote: On 09/24/2015 10:40 AM, Jakub Jelinek wrote: Iff GCC 5 compiled offloaded OpenACC/PTX code will always do host fallback anyway because of the incompatible PTX version, then why don't you

Re: Openacc launch API

2015-09-24 Thread Jakub Jelinek
On Thu, Sep 24, 2015 at 11:50:56AM +0200, Bernd Schmidt wrote: > On 09/24/2015 10:40 AM, Jakub Jelinek wrote: > >Iff GCC 5 compiled offloaded OpenACC/PTX code will always do host fallback > >anyway because of the incompatible PTX version, then why don't you just > >do > > goacc_save_and_set_bind

Re: Openacc launch API

2015-09-24 Thread Jakub Jelinek
On Fri, Sep 18, 2015 at 11:13:03AM +0200, Bernd Schmidt wrote: > On 09/17/2015 04:40 PM, Nathan Sidwell wrote: > > >Added call to gomp_fatal, indicating libgomp is out of date. Also added > >a default to the switch following with the same effect. The trouble > >with implementing handling of

Re: Openacc launch API

2015-09-21 Thread Nathan Sidwell
Jakub? https://gcc.gnu.org/ml/gcc-patches/2015-09/msg01287.html On 09/17/15 10:40, Nathan Sidwell wrote: Updated patch addressing your points. Some further comments though ... + while (GOMP_LAUNCH_PACK (GOMP_LAUNCH_END, 0, 0) + != (tag = va_arg (ap, unsigned))) That's a somewhat

Re: Openacc launch API

2015-09-18 Thread Nathan Sidwell
On 09/18/15 05:13, Bernd Schmidt wrote: Is that so difficult though? See if nvptx ignores (let's say) intelmic arguments in favour of the default and accepts nvptx ones. I'm sorry, I think it is unreasonable to require support in this patch for something that's not yet implemented in the

Re: Openacc launch API

2015-09-18 Thread Bernd Schmidt
On 09/17/2015 04:40 PM, Nathan Sidwell wrote: Added call to gomp_fatal, indicating libgomp is out of date. Also added a default to the switch following with the same effect. The trouble with implementing handling of device_type here now, is difficulty in testing its correctness. If it were

Re: Openacc launch API

2015-09-17 Thread Bernd Schmidt
Since Jakub appears to be busy, I'll give my 2 cents. On 08/25/2015 03:29 PM, Nathan Sidwell wrote: I did rename the GOACC_parallel entry point to GOACC_parallel_keyed and provide a forwarding function. However, as the mkoffload data is incompatible, this is probably overkill. I've had to

Re: Openacc launch API

2015-09-17 Thread Nathan Sidwell
On 09/17/15 05:36, Bernd Schmidt wrote: Fail how? Jakub has requested that it works but falls back to unaccelerated execution, can you confirm this is what you expect to happen with this patch? Yes, that is the failure mode. - if (num_waits) + va_start (ap, kinds); + /* TODO: This will

Re: Openacc launch API

2015-09-17 Thread Nathan Sidwell
Updated patch addressing your points. Some further comments though ... + while (GOMP_LAUNCH_PACK (GOMP_LAUNCH_END, 0, 0) + != (tag = va_arg (ap, unsigned))) That's a somewhat non-idiomatic way to write this, with the constant first and not obviously a constant. I'd initialize a

Re: Openacc launch API

2015-09-16 Thread Nathan Sidwell
Ping? On 09/11/15 11:50, Nathan Sidwell wrote: Ping? https://gcc.gnu.org/ml/gcc-patches/2015-08/msg01498.html On 09/07/15 08:48, Nathan Sidwell wrote: On 08/25/15 09:29, Nathan Sidwell wrote: Jakub, This patch changes the launch API for openacc parallels. The current scheme passes the

Re: Openacc launch API

2015-09-11 Thread Nathan Sidwell
Ping? https://gcc.gnu.org/ml/gcc-patches/2015-08/msg01498.html On 09/07/15 08:48, Nathan Sidwell wrote: On 08/25/15 09:29, Nathan Sidwell wrote: Jakub, This patch changes the launch API for openacc parallels. The current scheme passes the launch dimensions as 3 separate parameters to the

Re: Openacc launch API

2015-09-07 Thread Nathan Sidwell
On 08/25/15 09:29, Nathan Sidwell wrote: Jakub, This patch changes the launch API for openacc parallels. The current scheme passes the launch dimensions as 3 separate parameters to the GOACC_parallel function. This is problematic for a couple of reasons: 1) these must be validated in the

Re: Openacc launch API

2015-08-28 Thread Jakub Jelinek
On Fri, Aug 28, 2015 at 01:29:51PM -0400, Nathan Sidwell wrote: On 08/25/15 09:29, Nathan Sidwell wrote: I did rename the GOACC_parallel entry point to GOACC_parallel_keyed and provide a forwarding function. However, as the mkoffload data is incompatible, this is probably overkill.

Re: Openacc launch API

2015-08-28 Thread Nathan Sidwell
On 08/25/15 09:29, Nathan Sidwell wrote: I did rename the GOACC_parallel entry point to GOACC_parallel_keyed and provide a forwarding function. However, as the mkoffload data is incompatible, this is probably overkill. I've had to increment the (just committed) version number to detect the

Re: Openacc launch API

2015-08-28 Thread Nathan Sidwell
On 08/28/15 13:36, Jakub Jelinek wrote: On Fri, Aug 28, 2015 at 01:29:51PM -0400, Nathan Sidwell wrote: On 08/25/15 09:29, Nathan Sidwell wrote: I did rename the GOACC_parallel entry point to GOACC_parallel_keyed and provide a forwarding function. However, as the mkoffload data is

Openacc launch API

2015-08-25 Thread Nathan Sidwell
Jakub, This patch changes the launch API for openacc parallels. The current scheme passes the launch dimensions as 3 separate parameters to the GOACC_parallel function. This is problematic for a couple of reasons: 1) these must be validated in the host compiler 2) they provide no