Re: [PATCH 07/13] OpenACC 2.6 deep copy: libgomp parts

2020-05-20 Thread Julian Brown
On Wed, 20 May 2020 16:52:02 +0200 Thomas Schwinge wrote: > Hi! > > On 2019-12-17T22:03:47-0800, Julian Brown > wrote: > > --- a/libgomp/oacc-mem.c > > +++ b/libgomp/oacc-mem.c > > > static int > > -find_group_last (int pos, size_t mapnum, unsigned

Re: [PATCH] OpenACC reference count consistency checking

2020-05-08 Thread Julian Brown
On Fri, 8 May 2020 16:18:34 +0200 Thomas Schwinge wrote: > >> Can you please explain (textually?) how this checking (design per > >> your textual description below) is working in context of mixed > >> OpenACC structured ("S") and dynamic ("D") reference counts? For > >> example: > >> > >>

Re: [PATCH] OpenACC reference count consistency checking

2020-05-07 Thread Julian Brown
#pragma acc exit data delete ([data]) // no-op; S: 1, D: 0 > } // copyout; S: 0, D: 0 > > assert (!acc_is_present ([data])); > > (Haven't compiled but I'm reasonably sure that the nesting and my > manual "[action]; [S], [D]" annotations are corre

Re: Branch instructions that depend on target distance

2020-02-24 Thread Julian Brown
On Mon, 24 Feb 2020 15:03:21 +0300 (MSK) Alexander Monakov wrote: > On Mon, 24 Feb 2020, Andreas Schwab wrote: > > > On Feb 24 2020, Petr Tesarik wrote: > > > > > On Mon, 24 Feb 2020 12:29:40 +0100 > > > Andreas Schwab wrote: > > > > > >> On Feb 24 2020, Petr Tesarik wrote: > > >> > >

Re: [PATCH] Fix component mappings with derived types for OpenACC

2020-01-28 Thread Julian Brown
lable for the time being, so won't be able to use his rubber-stamp powers. I added the offending libgomp code to start with though, so I think I can go ahead and commit the patch. I'll hold off for 24 hours though in case there are any objections (Jakub?). Thanks, Julian > On 1/10/20 2:49 A

[PATCH 3/3] OpenACC dynamic data lifetimes ending within structured blocks

2020-01-17 Thread Julian Brown
This patch adds a new function to logically decrement the "dynamic reference counter" for a mapped OpenACC variable, and handles some cases in which that counter drops to zero inside a structured data block. Previously, it's likely that at least in some cases, ending a dynamic data lifetime in

[PATCH 0/3] Mixed static/dynamic data lifetimes with OpenACC (PR92843)

2020-01-17 Thread Julian Brown
es. Tested with offloading to NVPTX, also with a version of my refcount-verification patch (not currently on trunk). I believe this (at least the first two parts) fixes a regression (for the pr92843-1.c test case), so OK for stage 4? Thanks, Julian Julian Brown (3): Introduce dynamic data mappin

[PATCH 2/3] Don't copy back vars mapped with acc_map_data

2020-01-17 Thread Julian Brown
This patch prevents "exit data" directives from copying back data that was mapped with an acc_map_data API call. This matches the behaviour expected by the pr92843-1.c test, and together with the previous patch in this series, allows that test to pass (with no other regressions). Tested alongside

[PATCH 1/3] Introduce dynamic data mapping sentinel for OpenACC

2020-01-17 Thread Julian Brown
This patch provides a way to distinguish target_mem_descs that arise from "enter data" operations from those that arise from structured OpenACC data blocks. In that way, we can implement the equivalent of the "no-op" behaviour of decrementing a dynamic reference count that is already zero for some

Re: [PATCH 2/3] Don't allow mixed component and non-component accesses for OpenACC/Fortran

2020-01-09 Thread Julian Brown
On Tue, 7 Jan 2020 11:21:38 +0100 Tobias Burnus wrote: > Hi Julian, > > please hold back the commit. > > Actually, it does not seem to work if one modifies the test > case a bit. The following code compiles – but I think it > should not: > > type one >integer i, j > end type > type two >

[PATCH] Fix component mappings with derived types for OpenACC

2020-01-09 Thread Julian Brown
test. libgomp/ * oacc-mem.c (goacc_exit_data_internal): Remove special (no-copyback) behaviour for GOMP_MAP_STRUCT. commit 5e9d8846bbaa33a9bdb08adcf1ee9f224a8e8fc0 Author: Julian Brown Date: Wed Jan 8 15:57:46 2020 -0800 Fix component mappings with derived types for Ope

[PATCH 3/3] Check array contiguity for OpenACC/Fortran

2020-01-03 Thread Julian Brown
-04 Julian Brown PR fortran/93025 gcc/fortran/ * openmp.c (resolve_omp_clauses): Check array references for contiguity. gcc/testsuite/ * gfortran.dg/goacc/mapping-tests-2.f90: New test. * gfortran.dg/goacc/subarrays.f95: Expect rejection of non

[PATCH 1/3] Add OpenACC test for sub-references being pointer or allocatable variables

2020-01-03 Thread Julian Brown
Hi, This test (by Tobias Burnus, mildly edited) adds a test to check whether the final component of a derived-type access has pointer or allocatable type for manual deep copy attach/detach operations. This is just checking existing behaviour. This arose from discussion of the manual deep copy

[PATCH 2/3] Don't allow mixed component and non-component accesses for OpenACC/Fortran

2020-01-03 Thread Julian Brown
patch adds the same restriction to the Fortran front-end, and adjusts some existing tests to match. A test is also added for detection of duplicate derived-type member accesses within a directive. Tested with offloading to NVPTX. OK for mainline? Thanks, Julian ChangeLog 2020-01-04 Ju

Re: [PATCH 07/13] OpenACC 2.6 deep copy: libgomp parts

2020-01-03 Thread Julian Brown
Hi, On Sun, 22 Dec 2019 00:01:10 +0100 Thomas Schwinge wrote: > I had intentionally left out this assignment in my "In > 'libgomp/target.c', 'struct splay_tree_key_s', use 'struct > splay_tree_aux' for infrequently-used or API-specific data" patch, >

Re: [PING^4][PATCH 0/4] Fix library testsuite compilation for build sysroot

2020-01-03 Thread Julian Brown
Hi Maciej, On Sun, 22 Dec 2019 00:43:54 + (GMT) "Maciej W. Rozycki" wrote: > On Fri, 20 Dec 2019, Mike Stump wrote: > > > >> This patch series addresses a problem with the testsuite > > >> compiler being set up across libatomic, libffi, libgo, libgomp > > >> with no correlation whatsoever

Fix OpenACC deep-copy-10.c and lib-16-2.f90 test async-safety issues (PR93030)

2020-01-02 Thread Julian Brown
p.oacc-c-c++-common/deep-copy-10.c: Fix unsafe async usage. * testsuite/libgomp.oacc-fortran/lib-16-2.f90: Add async waits. commit 990d954e84ff393e4d07661d82979e9acce6c9a0 Author: Julian Brown Date: Thu Jan 2 16:14:17 2020 -0800 Fix deep-copy-10.c and lib-16-2.f90 async-saf

Re: [PATCH 00/13] OpenACC 2.6 manual deep copy support

2019-12-19 Thread Julian Brown
On Wed, 18 Dec 2019 18:44:04 +0100 Thomas Schwinge wrote: > Hi! > > On 2019-12-17T22:02:25-0800, Julian Brown > wrote: > > This patch series provides support for OpenACC 2.6's manual deep > > copy (attach/detach) feature. > > Thanks. > > > There is

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+0000, Julian Brown > wrote: > > On Fri, 13 Dec 2019 16:25:25 +0100 > > Thomas Schwinge wrote: > >> On 2019-10-29T

[PATCH 13/13] Fortran polymorphic class-type support for OpenACC

2019-12-17 Thread Julian Brown
This patch builds on the Fortran front-end support posted earlier in this series to enable polymorphic class pointers to be used in OpenACC directives as well. It was last posted here: https://gcc.gnu.org/ml/gcc-patches/2019-10/msg00541.html This version is largely the same as the previous

[PATCH 12/13] OpenACC 2.6 deep copy: Fortran execution tests

2019-12-17 Thread Julian Brown
This patch has been broken out of the "OpenACC 2.6 manual deep copy support" patch, last posted here: https://gcc.gnu.org/ml/gcc-patches/2019-11/msg02376.html This part adds Fortran execution tests to libgomp. Tested alongside other patches in this series with offloading to NVPTX. OK?

[PATCH 10/13] OpenACC 2.6 deep copy: Fortran front-end parts

2019-12-17 Thread Julian Brown
This patch has been broken out of the "OpenACC 2.6 manual deep copy support" patch, last posted here: https://gcc.gnu.org/ml/gcc-patches/2019-11/msg02376.html This part contains the Fortran front-end support for parsing the new attach and detach clauses, as well as derived-type members on

[PATCH 11/13] OpenACC 2.6 deep copy: C and C++ execution tests

2019-12-17 Thread Julian Brown
This patch has been broken out of the "OpenACC 2.6 manual deep copy support" patch, last posted here: https://gcc.gnu.org/ml/gcc-patches/2019-11/msg02376.html This part adds C and C++ execution tests to libgomp. Tested alongside other patches in this series with offloading to NVPTX. OK?

[PATCH 09/13] OpenACC 2.6 deep copy: C and C++ front-end parts

2019-12-17 Thread Julian Brown
This patch has been broken out of the "OpenACC 2.6 manual deep copy support" patch, last posted here: https://gcc.gnu.org/ml/gcc-patches/2019-11/msg02376.html This part contains the C and C++ changes to parse attach and detach clauses and struct member accesses via "." or "->" on other

[PATCH 08/13] OpenACC 2.6 deep copy: middle-end parts

2019-12-17 Thread Julian Brown
This patch has been broken out of the "OpenACC 2.6 manual deep copy support" patch, last posted here: https://gcc.gnu.org/ml/gcc-patches/2019-11/msg02376.html This part contains the middle-end support for OpenACC 2.6 attach and detach operations, either as standalone clauses or as

[PATCH 06/13] OpenACC 2.6 deep copy: attach/detach API routines

2019-12-17 Thread Julian Brown
This patch has been broken out of the "OpenACC 2.6 manual deep copy support" patch, last posted here: https://gcc.gnu.org/ml/gcc-patches/2019-11/msg02376.html It contains just the minimal libgomp bits necessary to support the OpenACC runtime API routines (acc_attach, acc_detach and

[PATCH 07/13] OpenACC 2.6 deep copy: libgomp parts

2019-12-17 Thread Julian Brown
This patch has been broken out of the "OpenACC 2.6 manual deep copy support" patch, last posted here: https://gcc.gnu.org/ml/gcc-patches/2019-11/msg02376.html This part contains the libgomp runtime support for the GOMP_MAP_ATTACH and GOMP_MAP_DETACH mapping kinds (etc.), as introduced by the

[PATCH 03/13] OpenACC reference count consistency checking

2019-12-17 Thread Julian Brown
This is a rebased version of the reference count consistency checking patch last posted upstream here: https://gcc.gnu.org/ml/gcc-patches/2019-10/msg00239.html This is not necessary for proper operation of the rest of the patches in this series, but has proved useful in development. Tested

[PATCH 05/13] Factor out duplicate code in gimplify_scan_omp_clauses

2019-12-17 Thread Julian Brown
This patch was previously posted here: https://gcc.gnu.org/ml/gcc-patches/2019-11/msg00321.html This version is the same as the last-posted version. The middle-end patch later in the series depends on this. Tested alongside other patches in this series with offloading to NVPTX. OK? Thanks,

[PATCH 04/13] Use gomp_map_val for OpenACC host-to-device address translation

2019-12-17 Thread Julian Brown
This patch was previously approved here, but I have not committed it yet (without the other patches in this series): https://gcc.gnu.org/ml/gcc-patches/2019-10/msg01156.html Included for completeness. I will commit this alongside other patches if they are approved (or it could probably go in

[PATCH 01/13] Use aux struct in libgomp for infrequently-used/API-specific data

2019-12-17 Thread Julian Brown
This patch has been broken out of the "OpenACC 2.6 manual deep copy support" patch, last posted here: https://gcc.gnu.org/ml/gcc-patches/2019-11/msg02376.html This part is included for completeness. It is the same as the patch posted by Thomas here:

[PATCH 02/13] OpenACC reference count overhaul

2019-12-17 Thread Julian Brown
PR92843 test to fail, though IMO that test relies on behaviour arising from a rather nuanced reading of the spec. Hopefully we can resolve that problem as a follow-up. Tested alongside other patches in this series with offloading to NVPTX. OK? Julian 2019-11-22 Julian Brown Thomas

[PATCH 00/13] OpenACC 2.6 manual deep copy support

2019-12-17 Thread Julian Brown
with offloading to NVPTX. Further commentary (together with links to previous submissions) is provided alongside individual patches, where relevant. Thanks, Julian Julian Brown (13): Use aux struct in libgomp for infrequently-used/API-specific data OpenACC reference count overhaul OpenACC reference

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_poi

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+0000, Julian Brown > wrote: > > static int > > -find_pointer (int pos, size_t mapnum, unsigned short *kinds) > > +find_group_last (int pos, size_t

Re: [OpenACC] Elaborate/simplify 'exit data' 'finalize' handling (was: [OpenACC] Update OpenACC data clause semantics to the 2.5 behavior)

2019-12-13 Thread Julian Brown
On Fri, 13 Dec 2019 15:13:53 +0100 Thomas Schwinge wrote: > Hi! > > Julian, Tobias, regarding the following OpenACC 'exit data' 'finalize' > handling: > > On 2018-05-25T13:01:58-0700, Cesar Philippidis > wrote: > > --- a/gcc/gimplify.c > > +++ b/gcc/gimplify.c > > > @@ -10859,6 +10849,53

[PATCH, OpenACC] Fix potential race condition in OpenACC "exit data" operations

2019-12-12 Thread Julian Brown
hangeLog 2019-12-12 Julian Brown Thomas Schwinge PR libgomp/92881 libgomp/ * libgomp.h (gomp_remove_var_async): Add prototype. * oacc-mem.c (delete_copyout): Call gomp_remove_var_async instead of gomp_remove_var. * target.c (gomp_unref_tgt): Change return type

[PATCH] OpenACC device-pointer lookup with globally-mapped variables (PR92888)

2019-12-12 Thread Julian Brown
Hi, This patch provides a fix for PR92888, wherein global variables mapped using an OpenACC 'declare' directive would not be visible to device-pointer lookups. Tested with offloading to nvptx. OK? Thanks, Julian ChangeLog 2019-12-12 Julian Brown PR libgomp/92888 libgomp

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, si

Re: [PATCH 01/13] Add support for gang local storage allocation in shared memory

2019-12-04 Thread Julian Brown
Hi! On Fri, 15 Nov 2019 13:41:11 -0800 Julian Brown wrote: > This patch provides support for gang local storage allocation in > shared memory. It is mostly identical to the version posted > previously, with one cosmetic fix (a duplicated identical condition): > > https://gcc

[AMDGCN] Use fixed registers for queue ptr sgpr pair

2019-12-03 Thread Julian Brown
rtitioning patches). Thanks, Julian ChangeLog gcc/ * config/gcn/gcn.h (FIXED_REGISTERS): Make s6/s7 fixed registers. commit a4e9b17ba2bcdc3ab206fa4424cb55bc320fd092 Author: Julian Brown Date: Mon Dec 2 16:53:50 2019 -0800 Use fixed registers for queue ptr sgpr pair

Re: "gcn" vs. "amdgcn" etc. (was: [PATCH 4/7 libgomp,amdgcn] GCN libgomp port)

2019-12-03 Thread Julian Brown
On Tue, 3 Dec 2019 15:06:48 +0100 Thomas Schwinge wrote: > We probably can't/shouldn't change 'amdgcn' in the target triplet now, > but as far as I'm concerned, it's not too late to change > 'gcc/config/gcn' etc., but I guess that won't happen: too much > effort. (And then, I don't feel too

Re: Which OpenACC 'acc_device_t' to use for AMD GPU offloading (was: [PATCH 4/7 libgomp,amdgcn] GCN libgomp port)

2019-12-03 Thread Julian Brown
On Tue, 3 Dec 2019 10:32:57 +0100 Thomas Schwinge wrote: > Hi! > > On 2019-12-02T14:50:42+0000, Julian Brown > wrote: > > On Mon, 2 Dec 2019 15:43:29 +0100 > > Thomas Schwinge wrote: > > > >> > --- a/libgomp/openacc.h > >> > +++ b/l

Re: [PATCH 4/7 libgomp,amdgcn] GCN libgomp port

2019-12-02 Thread Julian Brown
On Mon, 2 Dec 2019 15:43:29 +0100 Thomas Schwinge wrote: > > --- a/libgomp/openacc.h > > +++ b/libgomp/openacc.h > > @@ -55,6 +55,7 @@ typedef enum acc_device_t { > >/* acc_device_host_nonshm = 3 removed. */ > >acc_device_not_host = 4, > >acc_device_nvidia = 5, > > + acc_device_gcn

Re: [PATCH] Fix decimal floating-point LTO streaming for offloading compilation

2019-11-28 Thread Julian Brown
On Thu, 28 Nov 2019 15:04:05 + Joseph Myers wrote: > On Thu, 28 Nov 2019, Julian Brown wrote: > > > Unlike e.g. the _FloatN types, when decimal floating-point types are > > enabled, common tree nodes are created for each float type size > > (e.g. dfloat32_type_

[PATCH] Fix decimal floating-point LTO streaming for offloading compilation

2019-11-28 Thread Julian Brown
c/ * tree.c (build_common_tree_nodes): Use pointer type for dfloat32_ptr_type_node, dfloat64_ptr_type_node and dfloat128_ptr_type_node when decimal floating point support is disabled. commit 17119773a8a45af098364b4faafe68f2e868479a Author: Julian Brown Date: Wed Nov 27 18:41:56 2019

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 t

Re: [PATCH] [og9] Fix libgomp.oacc-fortran/lib-16.f90 test

2019-11-22 Thread Julian Brown
On Fri, 22 Nov 2019 16:11:15 + Kwok Cheung Yeung wrote: > libgomp.oacc-fortran/lib-16.f90 in the libgomp testsuite currently > fails with: > > Program aborted. Backtrace: > #0 0x4013bf in MAIN__ > at > src/gcc-gcn-master/libgomp/testsuite/libgomp.oacc-fortran/lib-16.f90:28 > #1

[PATCH 13/13] Enable worker partitioning for AMD GCN

2019-11-15 Thread Julian Brown
This patch flips the switch to enable worker partitioning on AMD GCN. OK? Thanks, Julian ChangeLog gcc/ * config/gcn/gcn.c (gcn_goacc_validate_dims): Remove no-flag_worker-partitioning assertion. (TARGET_GOACC_WORKER_PARTITIONING): Define target hook to true.

[PATCH 12/13] Fix parallel-dims.f90 for AMD GCN

2019-11-15 Thread Julian Brown
This patch provides AMD GCN support for the parallel-dims.f90 test's parallel-dims-aux.c helper. OK? Thanks, Julian ChangeLog libgomp/ * testsuite/libgomp.oacc-fortran/parallel-dims-aux.c: Support AMD GCN. --- .../testsuite/libgomp.oacc-fortran/parallel-dims-aux.c | 9

[PATCH 11/13] AMD GCN symbol output with null cfun

2019-11-15 Thread Julian Brown
This patch checks that cfun is valid in the gcn_asm_output_symbol_ref function. This prevents a crash when that function is called with NULL cfun, i.e. when outputting debug symbols. OK? Thanks, Julian ChangeLog gcc/ * config/gcn/gcn.c (gcn_asm_output_symbol_ref): Handle null

[PATCH 10/13] Race conditions in OpenACC async tests

2019-11-15 Thread Julian Brown
This patch provides some race-condition fixes for tests that broke for AMD GCN. OK? Thanks, Julian ChangeLog libgomp/ * testsuite/libgomp.oacc-c-c++-common/lib-94.c: Fix race condition. * testsuite/libgomp.oacc-fortran/lib-16-2.f90: Likewise. ---

[PATCH 09/13] AMD GCN libgomp plugin queue-full condition locking fix

2019-11-15 Thread Julian Brown
This patch corrects a possible race condition in locking for the asynchronous queue-full condition check in the AMD GCN libgomp plugin. OK? Julian ChangeLog libgomp/ * plugin/plugin-gcn.c (wait_for_queue_nonfull): Don't lock/unlock aq->mutex here.

[PATCH 08/13] Fix host-to-device copies from rodata for AMD GCN

2019-11-15 Thread Julian Brown
It appears that the hsa_memory_copy API routine has problems copying from read-only data: in the libgomp/testsuite/libgomp.oacc-c-c++-common/reduction-8.c test, a "const" variable cannot be successfully copied to the target. I think the problem is with read-only page mappings (in the HSA runtime).

[PATCH 07/13] Fix OpenACC "ephemeral" asynchronous host-to-device copies

2019-11-15 Thread Julian Brown
The AMD GCN runtime support appears to exercise asynchronous operations more heavily than other offload targets. As such, latent problems with asynchronous host-to-device copies have come to light with GCN. This patch provides a solution to those. Previously posted for the og9 branch (with some

[PATCH 04/13] OpenACC middle-end worker-partitioning support

2019-11-15 Thread Julian Brown
This is the main patch implementing worker-partitioning support on AMD GCN. The following description is taken from the version of the patch submitted on the openacc-gcc-9-branch: This patch implements worker-partitioning support in the middle end, by rewriting gimple. The OpenACC execution model

[PATCH 06/13] Fix up tests for oaccdevlow pass split

2019-11-15 Thread Julian Brown
This patch adjusts expected output for several tests after the oaccdevlow pass is split into three by an earlier patch in this series. OK? Julian ChangeLog gcc/testsuite/ * c-c++-common/goacc/classify-kernels-unparallelized.c, c-c++-common/goacc/classify-kernels.c,

[PATCH 05/13] AMD GCN adjustments for middle-end worker partitioning

2019-11-15 Thread Julian Brown
This patch provides AMD GCN-specific parts supporting middle-end worker partitioning. The adjust_propagation_record hook is now called create_propagation_record. Several builtins are redefined to take an argument in a special address space (corresponding to GPU shared memory). Tested alongside

[PATCH 03/13] Rewrite OpenACC private or reduction reference variables

2019-11-15 Thread Julian Brown
Reference-type private variables or reference-type variables used as reduction targets do not work well with the scheme to implement worker partitioning on AMD GCN. This patch (originally by Cesar Philippidis, but modified somewhat) provides support for replacing such variables with new

[PATCH 00/13] AMD GCN worker partitioning support

2019-11-15 Thread Julian Brown
GPUs. The series has been tested as a whole with offloading to AMD GCN. Further commentary is provided alongside individual patches. OK for trunk? Thanks, Julian Julian Brown (13): Add support for gang local storage allocation in shared memory Target-dependent gang-private variable decl

[PATCH 02/13] Target-dependent gang-private variable decl rewriting

2019-11-15 Thread Julian Brown
This patch provides support for the adjust_private_decl hook introduced by the previous patch changing the type of its decl argument, e.g. if the offload target forces it into another address space. Any ADDR_EXPR nodes that have the decl as an argument will have the wrong type: this patch

[PATCH 01/13] Add support for gang local storage allocation in shared memory

2019-11-15 Thread Julian Brown
This patch provides support for gang local storage allocation in shared memory. It is mostly identical to the version posted previously, with one cosmetic fix (a duplicated identical condition): https://gcc.gnu.org/ml/gcc-patches/2019-11/msg00448.html Tested alongside other patches in this

Re: [gomp4.1] Support #pragma omp target {enter,exit} data

2019-11-14 Thread Julian Brown
On Thu, 14 Nov 2019 12:08:45 +0100 Thomas Schwinge wrote: > Hi! > > In context of reviewing Julian's "OpenACC reference count overhaul", > I'm generally reviewing (also known as: trying to understand) the > libgomp OpenMP 'target' "refcount"ing , and I noticed something > strange (?): > > On

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+0000, Julian Brown > wrote: > > This is a new version of the patch which hopefully addresses all > > review comments. Further commentary below. > > Thanks, great,

[PATCH] OpenACC "present" subarrays: runtime API return value and unmapping fixes

2019-11-08 Thread Julian Brown
oacc-c-c++-common/lib-30.c: Likewise. commit 00607b06c8e506b0f0744a230856e1e8776633c3 Author: Julian Brown Date: Thu Nov 7 14:24:49 2019 -0800 OpenACC "present" subarrays: runtime API return value and unmapping fixes libgomp/ * oacc-mem.c (present_create_co

Re: [PATCH, OpenACC] Add support for gang local storage allocation in shared memory

2019-11-06 Thread Julian Brown
bly be replaced with some lighter-weight mechanism as a followup). I realised I omitted to make some of the cosmetic changes Thomas highlighted below on starting to write this email, but I can do that (with suitable retesting) if desired before committing. On Wed, 12 Jun 2019 20:42:16 +0100 Julian B

Re: [PATCH 3/4] Factor out duplicate code in gimplify_scan_omp_clauses

2019-11-05 Thread Julian Brown
ig_base' supplied), and the other caller takes the second branch > ('orig_base' not supplied). If you tell me that's not feasible, then > I shall again try to understand that code in the form you've proposed. ...is left outside the refactored function, as you suggest here.

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

Remove vars before TLS data during OpenACC shutdown

2019-10-21 Thread Julian Brown
during OpenACC shutdown. commit bbf990a35ab5a7b5100b03c5c5aca11ef0729e7b Author: Julian Brown Date: Fri Oct 18 11:47:37 2019 -0700 Remove vars before TLS data during OpenACC shutdown libgomp/ * oacc-init.c (acc_shutdown_1): Remove variable mappings before TLS

Re: [PATCH] OpenACC reference count overhaul

2019-10-21 Thread Julian Brown
On Tue, 15 Oct 2019 17:30:06 +0200 Thomas Schwinge wrote: > 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:

[PATCH] [og9] Re-do OpenACC private variable resolution

2019-10-16 Thread Julian Brown
This patch (for the openacc-gcc-9-branch) reworks how the partitioning level for OpenACC "private" variables is calculated and represented in the compiler. There have been two previous approaches: - The first (by Chung-Lin Tang) recorded which variables should be made private per-gang in each

[PATCH] [og9] Fix libgomp serial-dims.c test for AMD GCN

2019-10-16 Thread Julian Brown
This patch adds support for AMD GCN offloading to the libgomp.oacc-c-c++-common/serial-dims.c test case. I will apply to the og9 branch shortly. Thanks, Julian ChangeLog libgomp/ * testsuite/libgomp.oacc-c-c++-common/serial-dims.c: Support AMD GCN. ---

Re: general_operand not validating "(const_int 65535 [0xffff])"

2019-10-09 Thread Julian Brown
On Wed, 9 Oct 2019 14:40:42 +0100 Jozef Lawrynowicz wrote: > Constants generated for modes with fewer bits than in HOST_WIDE_INT > must be sign extended to full width (e.g., with gen_int_mode). For > constants for modes with more bits than in HOST_WIDE_INT the implied > high order bits of that

[PATCH] Fortran polymorphic class-type support for OpenACC

2019-10-08 Thread Julian Brown
This patch provides basic support for Fortran (2003) polymorphic class pointers. Such pointers have a descriptor that is somewhat like an array descriptor, so I re-used the GOMP_MAP_TO_PSET mapping to transfer such class descriptors from the host to the target. That seems to work well, though I

[PATCH 0/4] OpenACC 2.6 manual deep copy (repost)

2019-10-06 Thread Julian Brown
Julian Brown (4): Add function for pretty-printing OpenACC clause names Use gomp_map_val for OpenACC host-to-device address translation Factor out duplicate code in gimplify_scan_omp_clauses OpenACC 2.6 manual deep copy support (attach/detach) gcc/c-family/c-common.h

[PATCH 3/4] Factor out duplicate code in gimplify_scan_omp_clauses

2019-10-06 Thread Julian Brown
This patch factors out some code in gimplify_scan_omp_clauses into two new outlined functions. Previously approved here: https://gcc.gnu.org/ml/gcc-patches/2018-12/msg01309.html FAOD, OK for trunk? Thanks, Julian ChangeLog gcc/ * gimplify.c (insert_struct_comp_map,

[PATCH 2/4] Use gomp_map_val for OpenACC host-to-device address translation

2019-10-06 Thread Julian Brown
This patch uses gomp_map_val for OpenACC host-to-device address translation instead of open-coding the device address calculation. OK for trunk? Thanks, Julian ChangeLog libgomp/ * libgomp.h (gomp_map_val): Add prototype. * oacc-parallel.c (GOACC_parallel_keyed): Use

[PATCH 1/4] Add function for pretty-printing OpenACC clause names

2019-10-06 Thread Julian Brown
This patch adds a function to pretty-print OpenACC clause names from OMP_CLAUSE_MAP_KINDs, for error output. The function is used by subsequent patches. Previously approved as part of: https://gcc.gnu.org/ml/gcc-patches/2018-12/msg01292.html FAOD, OK for trunk? Julian ChangeLog

[PATCH] OpenACC reference count consistency checking

2019-10-03 Thread Julian Brown
to NVPTX. OK for trunk? Thanks, Julian 2019-10-02 Julian Brown libgomp/ * libgomp.h (RC_CHECKING): New macro, disabled by default, guarding all hunks in this patch. (target_mem_desc): Add refcount_chk, mark fields. (splay_tree_key_s): Add refcount_chk field

[PATCH] OpenACC reference count overhaul

2019-10-03 Thread Julian Brown
anticipate that support. Tested with offloading to NVPTX, with good results (though a couple of tests need fixing also). A follow-up patch provides self-checking of the reference count implementation. OK for trunk? Thanks, Julian 2019-10-02 Julian Brown libgomp/ * libgomp.h

[PATCH] Libgomp magic offset value self-documentation

2019-10-03 Thread Julian Brown
by Thomas in: https://gcc.gnu.org/ml/gcc-patches/2018-12/msg01723.html This patch comprises the remaining parts. Tested (alongside other patches) with offloading to NVPTX. OK for trunk? Thanks, Julian 2019-10-02 Julian Brown Cesar Philippidis libgomp/ * libgomp.h

[PATCH] [og9] Handle references in OpenACC "private" clauses

2019-09-20 Thread Julian Brown
23b6eb1d74 100644 --- a/gcc/ChangeLog.openacc +++ b/gcc/ChangeLog.openacc @@ -1,3 +1,8 @@ +2019-09-20 Julian Brown + + * gimplify.c (localize_reductions): Rewrite references for + OMP_CLAUSE_PRIVATE also. + 2019-09-17 Tobias Burnus * config/gcn/gcn.c (gcn_expand_scalar_to_vect

[PATCH] [og9] Add 'ephemeral' parameter to GOMP_OFFLOAD_openacc_async_host2dev

2019-09-19 Thread Julian Brown
943a9e4a933..7813760e642 100644 --- a/libgomp/ChangeLog.openacc +++ b/libgomp/ChangeLog.openacc @@ -1,3 +1,8 @@ +2019-09-19 Julian Brown + + * plugin/plugin-nvptx.c (GOMP_OFFLOAD_openacc_async_host2dev): + Add EPHEMERAL parameter, and FIXME function comment. + 2019-09-18 Tobias Burnus

[PATCH] [og9] OpenACC profiling-interface fixes for asynchronous operations

2019-09-17 Thread Julian Brown
insertions(+), 88 deletions(-) diff --git a/libgomp/ChangeLog.openacc b/libgomp/ChangeLog.openacc index 41e05e9c61b..5f39fae6f51 100644 --- a/libgomp/ChangeLog.openacc +++ b/libgomp/ChangeLog.openacc @@ -1,3 +1,29 @@ +2019-09-17 Julian Brown + + * oacc-host.c (host_openacc_async_queu

[PATCH] [og9] Fix OpenACC "ephemeral" asynchronous host-to-device copies

2019-09-17 Thread Julian Brown
cc b/libgomp/ChangeLog.openacc index 5f39fae6f51..1006b8149c8 100644 --- a/libgomp/ChangeLog.openacc +++ b/libgomp/ChangeLog.openacc @@ -1,3 +1,36 @@ +2019-09-17 Julian Brown + + * libgomp-plugin.h (GOMP_OFFLOAD_openacc_async_host2dev): Update + prototype. + * libgomp.h (gomp_copy_host2de

[PATCH] [og9] Update expected messages, errors and warnings for "kernels" tests

2019-09-17 Thread Julian Brown
-git a/gcc/testsuite/ChangeLog.openacc b/gcc/testsuite/ChangeLog.openacc index 899b9cf1783..6faedb6866a 100644 --- a/gcc/testsuite/ChangeLog.openacc +++ b/gcc/testsuite/ChangeLog.openacc @@ -1,3 +1,16 @@ +2019-09-17 Julian Brown + + * c-c++-common/goacc/classify-kernels-unparallelized

[PATCH] [og9] Fix uninitialised read in gomp_map_vars_internal

2019-09-17 Thread Julian Brown
/libgomp/ChangeLog.openacc @@ -1,3 +1,8 @@ +2019-09-17 Julian Brown + + * target.c (gomp_map_vars_internal): Remove read of uninitialised + data. + 2019-09-17 Julian Brown * testsuite/libgomp.oacc-c-c++-common/async_queue-1.c: Only run diff --git a/libgomp/target.c b/libgomp

[PATCH] [og9] A couple of GCN-specific test fixes

2019-09-17 Thread Julian Brown
/libgomp/ChangeLog.openacc @@ -1,3 +1,14 @@ +2019-09-17 Julian Brown + + * testsuite/libgomp.oacc-c-c++-common/async_queue-1.c: Only run + NVidia-specific test on NVidia hardware. + * testsuite/libgomp.oacc-c-c++-common/asyncwait-nop-1.c (main): + Initialise

[PATCH] [og9] Clean up dead/write-only fields in GCN libgomp plugin

2019-09-10 Thread Julian Brown
+1,9 @@ +2019-09-10 Julian Brown + + * config/gcn/mkoffload.c (process_asm): Remove omp_data_size, + gridified_kernel_p, kernel_dependencies_count, kernel_dependencies + from emitted hsa_kernel_description struct array. + 2019-09-10 Andrew Stubbs * config/gcn/gcn.c

[PATCH] [og9] Fix src_copy mismerge in GOMP_OFFLOAD_openacc_async_host2dev

2019-09-10 Thread Julian Brown
/ChangeLog.openacc index 59605cd85bf..a15d4a0ed49 100644 --- a/libgomp/ChangeLog.openacc +++ b/libgomp/ChangeLog.openacc @@ -1,3 +1,8 @@ +2019-09-10 Julian Brown + + * plugin/plugin-gcn.c (GOMP_OFFLOAD_openacc_async_host2dev): Enqueue + copy from src_copy not src. + 2019-09-10 Kwok

[PATCH] [og9] Improve async serialize implementation for AMD GCN libgomp plugin

2019-09-10 Thread Julian Brown
/ChangeLog.openacc @@ -1,3 +1,24 @@ +2019-09-10 Julian Brown + + * plugin/plugin-gcn.c (struct placeholder, struct asyncwait_info, + enum entry_type): New. + (queue_entry): Use entry_type enum for tag. Add asyncwait and + placeholder event type fields

[PATCH] [og9] Use more appropriate var in localize_reductions call

2019-09-06 Thread Julian Brown
/gcc/ChangeLog.openacc @@ -1,3 +1,8 @@ +2019-09-06 Julian Brown + + * gimplify.c (gimplify_omp_for): Use for_stmt in call to + localize_reductions. + 2019-09-06 Julian Brown * config/nvptx/nvptx.c (omp-sese.h): Include. diff --git a/gcc/gimplify.c b/gcc/gimplify.c index

[PATCH] [og9] OpenACC profiling support for AMD GCN

2019-09-06 Thread Julian Brown
This patch adds profiling support to the AMD GCN libgomp plugin, modeled after the equivalent support in the NVPTX plugin. This gives a positive test delta in AMD GCN offload testing. I will apply to the openacc-gcc-9-branch shortly. Julian 2019-09-06 Julian Brown libgomp

[PATCH] [og9] Add omp_pause_resource{,_all} for AMD GCN

2019-09-06 Thread Julian Brown
100644 --- a/libgomp/ChangeLog.openacc +++ b/libgomp/ChangeLog.openacc @@ -1,3 +1,8 @@ +2019-09-06 Julian Brown + + * config/gcn/target.c (omp_pause_resource, omp_pause_resource_all): New + functions, plus ialiases. + 2019-09-05 Julian Brown * plugin/plugin-gcn.c (gcn_exec

Re: [PATCH 2/6] [og9] OpenACC middle-end worker-partitioning support

2019-09-06 Thread Julian Brown
On Thu, 5 Sep 2019 16:01:19 +0100 Julian Brown wrote: > On Thu, 5 Sep 2019 21:52:00 +0800 > Chung-Lin Tang wrote: > > > On 2019/9/5 9:45 AM, Julian Brown wrote: > > > Much of omp-sese.c originates from code written for NVPTX by > > > Nathan Sidwell (adapted

[PATCH 1/2] [og9] Fix tree check failure with reduction localization

2019-09-06 Thread Julian Brown
/ChangeLog.openacc @@ -1,3 +1,8 @@ +2019-09-06 Julian Brown + + * gimplify.c (gimplify_omp_workshare): Use OMP_CLAUSES, OMP_BODY + instead of OMP_TARGET_CLAUSES, OMP_TARGET_BODY. + 2019-09-05 Andrew Stubbs Backport from mainline: diff --git a/gcc/gimplify.c b/gcc

[PATCH 2/2] [og9] Remove duplicate SESE code in NVPTX backend

2019-09-06 Thread Julian Brown
9e7893aa11e..ffe19bc5809 100644 --- a/gcc/ChangeLog.openacc +++ b/gcc/ChangeLog.openacc @@ -1,3 +1,25 @@ +2019-09-06 Julian Brown + + * config/nvptx/nvptx.c (omp-sese.h): Include. + (bb_pair_t, bb_pair_vec_t, pseudo_node_t, bracket, bracket_vec_t, + bb_sese, bb_sese::~bb_sese

Re: [PATCH 2/6] [og9] OpenACC middle-end worker-partitioning support

2019-09-05 Thread Julian Brown
On Thu, 5 Sep 2019 21:52:00 +0800 Chung-Lin Tang wrote: > On 2019/9/5 9:45 AM, Julian Brown wrote: > > Much of omp-sese.c originates from code written for NVPTX by Nathan > > Sidwell (adapted to work on gimple instead of RTL) -- though at > > present, only the p

[PATCH 5/6] [og9] Reference reduction localization

2019-09-04 Thread Julian Brown
insertions(+), 37 deletions(-) diff --git a/gcc/ChangeLog.openacc b/gcc/ChangeLog.openacc index 0d068ac8ae2..2b7f616810d 100644 --- a/gcc/ChangeLog.openacc +++ b/gcc/ChangeLog.openacc @@ -1,3 +1,19 @@ +2019-09-05 Cesar Philippidis + Julian Brown + + * gimplify.c (privatize_reduction

[PATCH 6/6] [og9] Enable worker partitioning for AMD GCN

2019-09-04 Thread Julian Brown
@@ +2019-09-05 Julian Brown + + * config/gcn/gcn.c (gcn_goacc_validate_dims): Remove + no-flag_worker-partitioning assertion. + (TARGET_GOACC_WORKER_PARTITIONING): Define target hook to true. + * config/gcn/gcn.opt (flag_worker_partitioning): Change default to 1. + 2019-09

<    1   2   3   4   5   6   7   8   9   >