Re: [patch] various OpenACC reduction enhancements - ME and nvptx changes

2018-10-30 Thread Cesar Philippidis
On 10/5/18 07:07, Tom de Vries wrote: > On 6/29/18 8:19 PM, Cesar Philippidis wrote: >> The attached patch includes the nvptx and GCC ME reductions enhancements. >> >> Is this patch OK for trunk? It bootstrapped / regression tested cleanly >> for x86_64 with nvptx off

[PATCH 4/4] [og8] Attach / Detach compiler tests

2018-10-30 Thread Cesar Philippidis
This patch introduces a couple of compiler tests for the OpenACC attach and detach clauses. I've committed it to openacc-gcc-8-branch. Cesar 2018-10-30 Cesar Philippidis gcc/testsuite/ * c-c++-common/goacc/mdc-1.c: New test. * c-c++-common/goacc/mdc-2.c: New test. * g++.dg/goacc/mdc.C

[PATCH 3/4] [og8] Attach / Detach C++ FE changes

2018-10-30 Thread Cesar Philippidis
to get libgomp.oacc-c++/this.C to work. I've committed this patch to openacc-gcc-8-branch. Cesar 2018-10-30 Cesar Philippidis gcc/cp/ * parser.c (cp_parser_omp_clause_name): Scan for attach and detach. (cp_parser_oacc_data_clause): Handle PRAGMA_OACC_CLAUSE_{ATTACH,

[PATCH 2/4] [og8] Attach / Detach C FE changes

2018-10-30 Thread Cesar Philippidis
Other than that, these patches are identical. I've committed this patch to openacc-gcc-8-branch. Cesar 2018-10-30 Cesar Philippidis gcc/c/ * c-parser.c (c_parser_omp_clause_name): Scan for attach and detach. (c_parser_oacc_data_clause): Handle PRAGMA_OACC_CLAUSE_{ATTACH,

[PATCH 1/4] [og8] Attach / Detach generic infrastructure

2018-10-30 Thread Cesar Philippidis
patch tweaks GOMP_MAP_DEEP_COPY because OG8 has a lot of other map types for acc declare and dynamic arrays. I suspect that change would be required for trunk too, eventually. I've committed this patch to openacc-gcc-8-branch. Cesar 2018-10-30 Cesar Philippidis gcc/ * gimp

Re: [nvptx] vector length patch series

2018-10-29 Thread Cesar Philippidis
On 10/5/18 23:22, Tom de Vries wrote: > On 9/18/18 10:04 PM, Cesar Philippidis wrote: >> 591973d3c3a [nvptx] use user-defined vectors when possible > > If I drop this patch, I get the same test results. Can you find a > testcase for which this patch has an effect? I just re

[PATCH 4/4] [OpenACC] Attach / Detach compiler tests

2018-10-25 Thread Cesar Philippidis
This patch introduces a couple of compiler tests for the OpenACC attach and detach clauses. Is this OK for trunk after the other patches get approved? Thanks, Cesar 2018-XX-YY Cesar Philippidis gcc/testsuite/ * c-c++-common/goacc/mdc-1.c: New test. * c-c++-common/goacc/mdc-2.c: New test

[PATCH 3/4] [OpenACC] Attach / Detach C++ FE changes

2018-10-25 Thread Cesar Philippidis
in the future to support more complicated C++ functionality. Is this patch OK for trunk? I bootstrapped and regression tested it for x86_64 Linux with nvptx offloading. Thanks, Cesar 2018-XX-YY Cesar Philippidis gcc/cp/ * parser.c (cp_parser_omp_clause_name): Scan for attach and detach

[PATCH 2/4] [OpenACC] Attach / Detach C FE changes

2018-10-25 Thread Cesar Philippidis
for attach or detach. Likewise, c_finish_omp_clauses calls c_oacc_check_attachments to ensure that the variable is a pointer. Is this patch OK for trunk? I bootstrapped and regression tested it for x86_64 Linux with nvptx offloading. Thanks, Cesar 2018-XX-YY Cesar Philippidis gcc/c/ * c

[PATCH 1/4] [OpenACC] Attach / Detach generic infrastructure

2018-10-25 Thread Cesar Philippidis
constructs. Is this patch OK for trunk? I bootstrapped and regression tested it for x86_64 Linux with nvptx offloading. Thanks, Cesar 2018-XX-YY Cesar Philippidis gcc/ * gimplify.c (gimplify_adjust_omp_clauses): Filter out GOMP_MAP_STRUCT for acc exit data. (gimplify_omp_target_update): Promote GOMP_

[OpenACC] initial manual deep copy in c

2018-10-02 Thread Cesar Philippidis
work in progress. I'm still experimenting with some other functionality. If you checkout that branch, beware it may be rebased. Cesar [OpenACC] Initial Manual Deep Copy 2018-10-02 Cesar Philippidis gcc/c/ * c-typeck.c (handle_omp_array_sections_1): Enable structs in acc data clauses

[patch,openacc] Add warning for unused acc routine parallelism

2018-10-02 Thread Cesar Philippidis
on implicitly private induction variables in gfortran) 2018-XX-YY Cesar Philippidis gcc/ * omp-general.c (oacc_verify_routine_clauses): New warning. gcc/testsuite/ * c-c++-common/goacc-gomp/nesting-fail-1.c: Update test. * c-c++-common/goacc/Wparentheses-1.c: Likewise. * c-c++-common/goacc

[patch,openacc] Check for sufficient parallelism when calling acc routines in Fortran

2018-10-02 Thread Cesar Philippidis
2018-XX-YY Cesar Philippidis gcc/fortran/ * gfortran.h (gfc_resolve_oacc_routine_call): Declare. (gfc_resolve_oacc_routines): Declare. * openmp.c (gfc_match_oacc_routine): Make error reporting more precise. Defer rejection of non-function and subroutine symbols until

[patch,openacc] Check clauses with intrinsic function specified in !$ACC ROUTINE ( NAME )

2018-10-02 Thread Cesar Philippidis
with intrinsic function specified in !$ACC ROUTINE ( NAME ) 2018-XX-YY Cesar Philippidis gcc/fortran/ * openmp.c (gfc_match_oacc_routine): Check clauses of intrinsic functions. gcc/testsuite/ * gfortran.dg/goacc/fixed-1.f: Update test. * gfortran.dg/goacc/pr72741-2.f: New test. * gfortran.dg

[patch,openacc] Repeated use of the OpenACC routine directive

2018-10-02 Thread Cesar Philippidis
ch too large. Is this patch OK for trunk? I bootstrapped and regtested it for x86_64 Linux with nvptx offloading. This patch is also self-contained to the OpenACC code path. Thanks, Cesar [OpenACC] Repeated use of the OpenACC routine directive 2018-XX-YY Thomas Schwinge Cesar Philippidis

[patch,openacc] Add support for OpenACC routine nohost clause

2018-10-02 Thread Cesar Philippidis
bootstrapped and regtested it for x86_64 Linux with nvptx offloading. Thanks Cesar [OpenACC] Add support for OpenACC routine nohost clause (was OpenACC bind, nohost changes) 2018-XX-YY Thomas Schwinge Cesar Philippidis gcc/ * tree-core.h (omp_clause_code): Add OMP_CLAUSE_NOHOST

[patch,openacc] Use oacc_verify_routine_clauses for C/C++

2018-10-02 Thread Cesar Philippidis
bootstrapped and regression tested it for x86_64 Linux with nvptx offloading. This is only touches the OpenACC code path. Cesar [OpenACC] Use oacc_verify_routine_clauses for C/C++ 2018-XX-YY Thomas Schwinge Cesar Philippidis gcc/ * omp-general.c (oacc_build_routine_dims): Move some of its

Re: [patch,openacc] C, C++ OpenACC wait diagnostic change

2018-09-26 Thread Cesar Philippidis
On 09/26/2018 12:50 PM, Joseph Myers wrote: > On Wed, 26 Sep 2018, Cesar Philippidis wrote: > >> Attached is an old patch which updated the C and C++ FEs to use %<)%> >> for the right ')' symbol. It's mostly a cosmetic change. All of the >> changes are self-cont

Re: [patch,wip] warn on noncontiguous pointers

2018-09-26 Thread Cesar Philippidis
On 09/26/2018 01:49 PM, Thomas Koenig wrote: > Hi Cesar, > >> As of GCC 8, gfortran now errors when a pointer with a contiguous >> attribute is set to point to a target without a contiguous attribute. I >> think this is overly strict, and should probably be demoted to a >> pedantic warning as

[patch,wip] warn on noncontiguous pointers

2018-09-26 Thread Cesar Philippidis
from non-contiguous target" error 2018-XX-YY Cesar Philippidis gcc/fortran/ * expr.c (gfc_check_pointer_assign): Demote "Assignment to contiguous pointer from non-contiguous target" to a warning. --- diff --git a/gcc/fortran/expr.c b/gcc/fortran/expr.c index 3315bb840af..74caa

[patch,openacc] Use correct location information for OpenACC shape and simple, clauses in C/C++

2018-09-26 Thread Cesar Philippidis
_64 Linux with nvptx offloading. Cesar [OpenACC] Use correct location information for OpenACC shape and simple clauses in C/C++ 2018-XX-YY Thomas Schwinge Cesar Philippidis gcc/c/ * c-parser.c (c_parser_oacc_shape_clause) (c_parser_oacc_simple_clause): Add loc formal parameter. Adj

[patch] nvptx libgcc atomic routines

2018-09-26 Thread Cesar Philippidis
Cesar Philippidis libgcc/ * config/nvptx/atomic.c: New file. * config/nvptx/t-nvptx (LIB2ADD): Include it. (cherry picked from gomp-4_0-branch r223177) --- libgcc/config/nvptx/atomic.c | 279 +++ libgcc/config/nvptx/t-nvptx | 3 +- 2 files changed, 281

[patch,openacc] Don't gimplify in ssa mode if seen_error in oacc_xform_loop

2018-09-26 Thread Cesar Philippidis
to do with this patch Thomas? I bootstrapped and regtested it for x86_64 Linux with nvptx offloading. Cesar [OpenACC] Don't gimplify in ssa mode if seen_error in oacc_xform_loop 2018-XX-YY Tom de Vries Cesar Philippidis gcc/ PR tree-optimization/68977 * omp-offload.c (oacc_xform_loop

[patch,openacc] use existing local variable in cp_parser_oacc_enter_exit_data

2018-09-26 Thread Cesar Philippidis
existing local variable in cp_parser_oacc_enter_exit_data 2018-XX-YY James Norris Cesar Philippidis gcc/cp/ * parser.c (cp_parser_oacc_enter_exit_data): Use existing local variable. (cherry picked from gomp-4_0-branch r223007) --- diff --git a/gcc/cp/parser.c b/gcc/cp/parser.c index

[patch,openacc] C, C++ OpenACC wait diagnostic change

2018-09-26 Thread Cesar Philippidis
Thanks, Cesar [OpenACC] C, C++ OpenACC wait diagnostic change 2018-XX-YY James Norris Cesar Philippidis gcc/c/ * c-parser.c (c_parser_oacc_wait_list): Change error message. gcc/cp/ * parser.c (cp_parser_oacc_wait_list): Change error message. gcc/testsuite/ * c-c++-common

Re: [PATCH][OpenACC] Update deviceptr handling during gimplification

2018-09-26 Thread Cesar Philippidis
On 09/25/2018 05:55 PM, Julian Brown wrote: > On Tue, 7 Aug 2018 15:09:38 -0700 > Cesar Philippidis wrote: > >> I had previously posted this patch as part of a monster deviceptr >> patch here >> <https://gcc.gnu.org/ml/gcc-patches/2018-06/msg01911.html>. Thi

[patch,openacc] update fortran nested parallelism error messages

2018-09-24 Thread Cesar Philippidis
offloading. Cesar [OpenACC] update fortran nested parallelism error messages 2018-09-24 Bernhard Reuther-Fischer Cesar Philippidis gcc/fortran/ * openmp.c (resolve_oacc_loop_blocks): gcc/testsuite/ * gfortran.dg/goacc/nested-parallelism.f90: New test. --- gcc/fortran/openmp.c

Re: [openacc] Teach gfortran to lower OpenACC routine dims

2018-09-24 Thread Cesar Philippidis
On 09/20/2018 09:10 AM, Bernhard Reutner-Fischer wrote: > On Thu, 20 Sep 2018 07:41:08 -0700 > Cesar Philippidis wrote: > >> On 09/19/2018 03:27 PM, Bernhard Reutner-Fischer wrote: >>> On Wed, 5 Sep 2018 12:52:03 -0700 >>> Cesar Philippidis wrote: > >>

Re: [patch,openacc] Generate sequential loop for OpenACC loop directive inside kernels

2018-09-20 Thread Cesar Philippidis
On 09/20/2018 10:14 AM, Cesar Philippidis wrote: > As Chung-Lin noted here > <https://gcc.gnu.org/ml/gcc-patches/2015-06/msg01079.html>: > > This patch adjusts omp-low.c:expand_omp_for_generic() to expand to a > "sequential" loop form (without the OM

Re: [patch,openacc] handle missing OMP_LIST_ clauses in fortran's parse tree debugger

2018-09-20 Thread Cesar Philippidis
On 09/20/2018 11:22 AM, Paul Richard Thomas wrote: > Hi Cesar, > > It looks OK to me. > > Thanks for the patch. > > Paul Thanks! Committed in r264446. Cesar > On 20 September 2018 at 18:21, Cesar Philippidis > wrote: >> This patch updates Fortran's pars

[patch,openacc] Update _OPENACC value and documentation for OpenACC 2.5

2018-09-20 Thread Cesar Philippidis
offloading. Thanks, Cesar [OpenACC] Update _OPENACC value and documentation for OpenACC 2.5 2018-XX-YY Thomas Schwinge Cesar Philippidis gcc/c-family/ * c-cppbuiltin.c (c_cpp_builtins): Update "_OPENACC" to "201510". gcc/fortran/ * cpp.c (cpp_define_builtins): Update &

[patch,openacc] Set safelen to INT_MAX for oacc independent pragma

2018-09-20 Thread Cesar Philippidis
pragma 2018-XX-YY Tom de Vries Cesar Philippidis gcc/ * omp-expand.c (expand_omp_for): Set loop->safelen to INT_MAX if marked_independent. (cherry picked from gomp-4_0-branch r226079) --- gcc/omp-expand.c | 1 + 1 file changed, 1 insertion(+) diff --git a/gcc/omp-expand.c b/gcc/omp

[patch,openacc] Propagate independent clause for OpenACC kernels pass

2018-09-20 Thread Cesar Philippidis
regressions. We do have a couple of other standalone kernels patches in og8, but those depend on other patches. Thanks, Cesar [OpenACC] Propagate independent clause for OpenACC kernels pass 2018-XX-YY Chung-Lin Tang Cesar Philippidis gcc/ * cfgloop.h (struct loop): Add 'bool marked_independent

[patch,openacc] Fix PR71959: lto dump of callee counts

2018-09-20 Thread Cesar Philippidis
some support for member data OpenACC 2.6, but some of the OpenACC C++ semantics are still unclear. Is this OK for trunk? I bootstrapped and regtested it for x86_64 Linux with nvptx offloading. Thanks, Cesar [PR71959] lto dump of callee counts 2018-XX-YY Nathan Sidwell Cesar Philippidis

[patch,openacc] Fix hang when running oacc exec with CUDA 9.0 nvprof

2018-09-20 Thread Cesar Philippidis
x86_64 Linux with nvptx offloading. Thanks, Cesar [OpenACC] Fix hang when running oacc exec with CUDA 9.0 nvprof 2018-XX-YY Tom de Vries Cesar Philippidis libgomp/ * oacc-init.c (acc_init_state_lock, acc_init_state, acc_init_thread): New variable. (acc_init_1): Set acc_init_

[patch,openacc] handle missing OMP_LIST_ clauses in fortran's parse tree debugger

2018-09-20 Thread Cesar Philippidis
it for x86_64 Linux with nvptx offloading. Thanks, Cesar [OpenACC] handle missing OMP_LIST_ clauses in fortran's parse tree debugger 2018-XX-YY Cesar Philippidis gcc/fortran/ * dump-parse-tree.c (show_omp_clauses): Add missing omp list_types and reorder the switch cases to match the enum

[patch,openacc] Generate sequential loop for OpenACC loop directive inside kernels

2018-09-20 Thread Cesar Philippidis
penACC] Generate sequential loop for OpenACC loop directive inside kernels 2018-XX-YY Chung-Lin Tang Cesar Philippidis gcc/ * omp-expand.c (struct omp_region): Add inside_kernels_p field. (expand_omp_for_generic): Adjust to generate a 'sequential' loop when GOMP builtin arguments a

[patch,openacc] Fix infinite recursion in OMP clause pretty-printing, default label

2018-09-20 Thread Cesar Philippidis
shouldn't be necessary because all of the clauses are fully implemented now, but it may prevent similar bugs from occuring in the future at least during development. 2018-XX-YY Tom de Vries Cesar Philippidis gcc/ * tree-pretty-print.c (dump_omp_clause): Fix infinite recursion

[patch,openacc] Fix acc_shutdown issue

2018-09-20 Thread Cesar Philippidis
ped and regtested it for x86_64 Linux with nvptx offloading and I didn't encounter any regressions. Thanks, Cesar [OpenACC] Fix acc_shutdown issue 2018-XX-YY James Norris Cesar Philippidis libgomp/ * oacc-init.c (acc_shutdown_1): Replace use of gomp_free_memmap with gomp_unmap_v

[patch,opencc] Don't mark OpenACC auto loops as independent inside acc parallel regions

2018-09-20 Thread Cesar Philippidis
https://gcc.gnu.org/ml/gcc-patches/2018-07/msg01552.html Is this OK for trunk? I bootstrapped and regtested on x86_64 Linux with nvptx offloading. Thanks, Cesar [OpenACC] Don't mark OpenACC auto loops as independent inside acc parallel regions 2018-XX-YY Cesar Philippidis gcc/ * omp-low.c

[patch,openacc] Better distinguish OpenACC and OpenMP sections in libgomp.texi

2018-09-20 Thread Cesar Philippidis
or trunk? I verified that libgomp.pdf looks ok. Thanks, Cesar [OpenACC] Update _OPENACC value and documentation for OpenACC 2.5 2018-XX-YY Thomas Schwinge Cesar Philippidis gcc/c-family/ * c-cppbuiltin.c (c_cpp_builtins): Update "_OPENACC" to "201510". gcc/fortran/ * cpp.c

Re: [openacc] Teach gfortran to lower OpenACC routine dims

2018-09-20 Thread Cesar Philippidis
On 09/19/2018 03:27 PM, Bernhard Reutner-Fischer wrote: > On Wed, 5 Sep 2018 12:52:03 -0700 > Cesar Philippidis wrote: > >> At present, gfortran does not encode the gang, worker or vector >> parallelism clauses when it creates acc routines dim attribute for >> subro

[nvptx] vector length patch series

2018-09-18 Thread Cesar Philippidis
Hi Tom, Here is a link to our nvptx vector length patches on github: https://github.com/cesarjp/gcc/tree/trunk-og8-vl-private Specifically, the code lives in the trunk-og8-vl-private branch. There are a couple of outstanding dependency patches: * Teach gfortran to lower OpenACC routine

Re: [PATCH,nvptx] Remove use of CUDA unified memory in libgomp

2018-09-18 Thread Cesar Philippidis
On 08/01/2018 04:12 AM, Tom de Vries wrote: > On 07/31/2018 05:27 PM, Cesar Philippidis wrote: >>/* Copy the (device) pointers to arguments to the device (dp and hp might >> in >> fact have the same value on a unified-memory system). */ > > This comment

[patch,nvptx] Add atomic_fetch* support for SImode arguments.

2018-09-17 Thread Cesar Philippidis
atomic-fetch-2.c incorrectly; there should be an underscore between atomic and fetch. This patch also fixes that. I tested this patch using both a standalone nvptx compiler and x86_64 Linux with nvptx offloading. Cesar [nvptx] Add atomic_fetch* support for SImode arguments. 2018-09-17 Cesar

Re: [PATCH, OpenACC] C++ reference mapping (PR middle-end/86336)

2018-09-10 Thread Cesar Philippidis
are mapped like this (from the omplower dump): >> >> map(force_present:*x [len: 4]) map(firstprivate ref:x [pointer assign, bias: >> 0]) >> >> Tested with offloading to NVPTX and bootstrapped. OK for trunk? >> >> Thanks, >> >> Julian

Re: [PATCH, OpenACC 2.5, libgomp] Add *_async versions of runtime library API functions

2018-09-10 Thread Cesar Philippidis
On 09/10/2018 08:04 AM, Chung-Lin Tang wrote: > GOACC_2.0 { > Index: libgomp/oacc-mem.c > === > --- libgomp/oacc-mem.c(revision 264192) > +++ libgomp/oacc-mem.c(working copy) > @@ -153,8 +153,9 @@ acc_free (void *d)

Re: [patch,nvptx] Basic -misa support for nvptx

2018-09-05 Thread Cesar Philippidis
On 09/05/2018 07:30 AM, Tom de Vries wrote: > On 09/05/2018 12:19 AM, Cesar Philippidis wrote: >> On 09/02/2018 07:57 AM, Cesar Philippidis wrote: >>> On 09/01/2018 12:04 PM, Tom de Vries wrote: >>>> On 08/31/2018 04:14 PM, Cesar Philippidis wrote: >&g

[OpenACC] Enable firstprivate OpenACC reductions

2018-09-05 Thread Cesar Philippidis
for (...) { #pragma acc loop reduction(+:s2) Here s2 will be transferred into the accelerator as firstprivate instead of copy. Is this OK for trunk? I regtested and bootstrapped for x86_64 with nvptx offloading. Cesar [OpenACC] Enable firstprivate OpenACC reductions 2018-XX-YY Cesar

[patch][OpenACC] Add target hook TARGET_GOACC_ADJUST_PARALLELISM

2018-09-05 Thread Cesar Philippidis
At present, GCC fixes the vector length on all targets. However, that is an artificial restriction. This patch introduces a new TARGET_GOACC_ADJUST_PARALLELISM hook that enables the runtime to correct the default number of acc workers and vectors. Extra care need to be done to ensure that large

[openacc] Teach gfortran to lower OpenACC routine dims

2018-09-05 Thread Cesar Philippidis
At present, gfortran does not encode the gang, worker or vector parallelism clauses when it creates acc routines dim attribute for subroutines and functions. While support for acc routine is lacking in other areas in gfortran (including modules), this patch is important because it encodes the

Re: [patch,nvptx] Basic -misa support for nvptx

2018-09-04 Thread Cesar Philippidis
On 09/02/2018 07:57 AM, Cesar Philippidis wrote: > On 09/01/2018 12:04 PM, Tom de Vries wrote: >> On 08/31/2018 04:14 PM, Cesar Philippidis wrote: > >>> Is this patch OK for trunk? >>> >> >> Well, how did you test this ( >> https://gcc.

Re: [patch,nvptx] Basic -misa support for nvptx

2018-09-02 Thread Cesar Philippidis
On 09/01/2018 12:04 PM, Tom de Vries wrote: > On 08/31/2018 04:14 PM, Cesar Philippidis wrote: >> Is this patch OK for trunk? >> > > Well, how did you test this ( > https://gcc.gnu.org/contribute.html#patches : "Bootstrapping and > testing. State the host and ta

[patch,nvptx] Basic -misa support for nvptx

2018-08-31 Thread Cesar Philippidis
2018-XX-YY Cesar Philippidis Bernd Schmidt gcc/ * config/nvptx/nvptx-opts.h: New file. * config/nvptx/nvptx.c (nvptx_file_start): Print the correct .target. * config/nvptx/nvptx.h: Include "nvptx-opts.h". (ASM_SPEC): Define. (TARGET_SM35): New macro. * config/nvpt

Re: [PATCH, OpenACC] (2/2) Fix implicit mapping for array slices on lexically-enclosing data constructs (PR70828)

2018-08-28 Thread Cesar Philippidis
On 08/28/2018 02:32 PM, Julian Brown wrote: > On Tue, 28 Aug 2018 12:23:22 -0700 > Cesar Philippidis wrote: >> This is specific to OpenACC, and needs to be guarded as such. > > Are you sure that condition can be true for OpenMP? I'd assumed not... My bad, you're correct. OMP

Re: [PATCH, OpenACC] (2/2) Fix implicit mapping for array slices on lexically-enclosing data constructs (PR70828)

2018-08-28 Thread Cesar Philippidis
On 08/28/2018 12:19 PM, Julian Brown wrote: > diff --git a/gcc/fortran/trans-openmp.c b/gcc/fortran/trans-openmp.c > index f038f4c..86be407 100644 > --- a/gcc/fortran/trans-openmp.c > +++ b/gcc/fortran/trans-openmp.c > @@ -1045,9 +1045,13 @@ gfc_omp_finish_clause (tree c, gimple_seq *pre_p) > >

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

2018-08-13 Thread Cesar Philippidis
On 08/13/2018 11:42 AM, Cesar Philippidis wrote: > On 08/13/2018 09:21 AM, Julian Brown wrote: > >> diff --git a/libgomp/testsuite/libgomp.oacc-c-c++-common/loop-gwv-2.c >> b/libgomp/testsuite/libgomp.oacc-c-c++-common/loop-gwv-2.c >> new file mode 100644 >> inde

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

2018-08-13 Thread Cesar Philippidis
On 08/13/2018 09:21 AM, Julian Brown wrote: > diff --git a/libgomp/testsuite/libgomp.oacc-c-c++-common/loop-gwv-2.c > b/libgomp/testsuite/libgomp.oacc-c-c++-common/loop-gwv-2.c > new file mode 100644 > index 000..2fa708a > --- /dev/null > +++

Re: [PATCH,nvptx] Use CUDA driver API to select default runtime launch, geometry

2018-08-13 Thread Cesar Philippidis
On 08/13/2018 08:08 AM, Tom de Vries wrote: > On 08/13/2018 04:54 PM, Cesar Philippidis wrote: >> Going >> forward, how would you like to proceed with the nvptx BE vector length >> changes. > > Do you have a branch available on github containing the patch series >

Re: [PATCH,nvptx] Use CUDA driver API to select default runtime launch, geometry

2018-08-13 Thread Cesar Philippidis
On 08/13/2018 05:04 AM, Tom de Vries wrote: > On 08/10/2018 08:39 PM, Cesar Philippidis wrote: >> is that I modified the default value for vectors as follows >> >> +int vectors = default_dim_p[GOMP_DIM_VECTOR] >> + ? 0 : dims[GOMP_DIM_VECTOR]; &g

Re: [PATCH,nvptx] Use CUDA driver API to select default runtime launch, geometry

2018-08-10 Thread Cesar Philippidis
On 08/08/2018 08:19 AM, Tom de Vries wrote: > On Wed, Aug 08, 2018 at 07:09:16AM -0700, Cesar Philippidis wrote: >> On 08/07/2018 06:52 AM, Cesar Philippidis wrote: Thanks for review. This version should address all of the following remarks. However, one thing to note ... >> [

Re: [PATCH,nvptx] Use CUDA driver API to select default runtime launch, geometry

2018-08-08 Thread Cesar Philippidis
On 08/07/2018 06:52 AM, Cesar Philippidis wrote: > I attached an updated version of the CUDA driver patch, although I > haven't rebased it against your changes yet. It still needs to be tested > against CUDA 5.5 using the systems/Nvidia's cuda.h. But I wanted to give > you an updat

[PATCH][OpenACC] Update deviceptr handling during gimplification

2018-08-07 Thread Cesar Philippidis
using GOMP_MAP_FORCE_DEVICEPTR. Is this patch OK for trunk? It bootstrapped / regression tested cleanly for x86_64 with nvptx offloading. Thanks, Cesar >From b5cf37b795ce78c78f3f434ac6999f7094bd86aa Mon Sep 17 00:00:00 2001 From: Cesar Philippidis Date: Mon, 7 May 2018 08:23:48 -0700 Subject: [PATCH] [OpenAC

[PATCH][OpenACC] Don't error on implicitly private induction variables in gfortran

2018-08-07 Thread Cesar Philippidis
r trunk? I bootstrapped and regression tested it for x86_64 with nvptx offloading. Thanks, Cesar >From 576b2a7d5574400f067ec309929b38b324d8c6f6 Mon Sep 17 00:00:00 2001 From: Cesar Philippidis Date: Fri, 27 Jan 2017 14:58:16 + Subject: [PATCH] [OpenACC] Don't error on implicitly private inducti

[PATCH][OpenACC] Add support for firstprivate Fortran allocatable scalars

2018-08-07 Thread Cesar Philippidis
to be transferred in via firstprivate because that would use up a lot of memory on the accelerator. Is this OK for trunk? I bootstrapped and regtested it for x86_64 with nvptx offloading. Thanks, Cesar >From b8fb83b36d0f96b12af9a1f5596f31b3c6b72ef0 Mon Sep 17 00:00:00 2001 From: Cesar Philippidis Date: Mon

[PATCH][OpenACC] update gfortran's tile clause error handling

2018-08-07 Thread Cesar Philippidis
705 Mon Sep 17 00:00:00 2001 From: Cesar Philippidis Date: Mon, 3 Oct 2016 13:58:59 + Subject: [PATCH] [OpenACC] update gfortran's tile clause error handling 2018-XX-YY Cesar Philippidis gcc/fortran/ * openmp.c (resolve_positive_int_expr): Promote the warning to an error. gcc/testsu

[PATCH][OpenACC] cleanup trans-stmt.h

2018-08-07 Thread Cesar Philippidis
This patch removes a stale reference to trans-openacc.c in gcc/fortran/trans-statement.h. I'll apply it to trunk as obvious shortly. Cesar >From a08fe168c3f3ca4d446915ad26027786cda58394 Mon Sep 17 00:00:00 2001 From: Cesar Philippidis Date: Tue, 14 Mar 2017 22:33:00 + Subject: [PA

Re: [PATCH,nvptx] Use CUDA driver API to select default runtime launch, geometry

2018-08-07 Thread Cesar Philippidis
be tested against CUDA 5.5 using the systems/Nvidia's cuda.h. But I wanted to give you an update. Does this patch look OK, at least after testing competes? I removed the tests for CUDA_ONE_CALL_MAYBE_NULL, because the newer CUDA API isn't supported in the older drivers. Cesar >From 7fc093da173543b43e1

Re: [PATCH,nvptx] Use CUDA driver API to select default runtime launch, geometry

2018-08-03 Thread Cesar Philippidis
On 08/03/2018 08:22 AM, Tom de Vries wrote: > On 08/01/2018 09:11 PM, Cesar Philippidis wrote: >> On 08/01/2018 07:12 AM, Tom de Vries wrote: >> >>>>>> + gangs = grids * (blocks / warp_size); >>>>> >>>>> So, we launch wit

Re: [PATCH,nvptx] Use CUDA driver API to select default runtime launch, geometry

2018-08-01 Thread Cesar Philippidis
On 08/01/2018 07:12 AM, Tom de Vries wrote: +gangs = grids * (blocks / warp_size); >>> >>> So, we launch with gangs == grids * workers ? Is that intentional? >> >> Yes. At least that's what I've been using in og8. Setting num_gangs = >> grids alone caused significant slow downs. >> >

Re: [PATCH,nvptx] Use CUDA driver API to select default runtime launch, geometry

2018-08-01 Thread Cesar Philippidis
On 08/01/2018 03:18 AM, Tom de Vries wrote: > On 07/31/2018 04:58 PM, Cesar Philippidis wrote: >> The attached patch teaches libgomp how to use the CUDA thread occupancy >> calculator built into the CUDA driver. Despite both being based off the >> CUDA thread occupancy sp

Re: [PATCH,nvptx] Remove use of 'struct map' from plugin (nvptx)

2018-08-01 Thread Cesar Philippidis
On 08/01/2018 04:01 AM, Tom de Vries wrote: > On 07/31/2018 05:12 PM, Cesar Philippidis wrote: >> This is an old patch which removes the struct map from the nvptx plugin. >> I believe at one point this was supposed to be used to manage async data >> mappings, but in practice

[og8] More goacc_parlevel enhancements

2018-07-31 Thread Cesar Philippidis
-07-31 Cesar Philippidis libgomp/ * testsuite/libgomp.oacc-c-c++-common/loop-gwv-1.c: Adjust test. * testsuite/libgomp.oacc-c-c++-common/loop-red-gwv-1.c: Likewise. * testsuite/libgomp.oacc-c-c++-common/loop-red-v-2.c: Likewise. * testsuite/libgomp.oacc-c-c++-common/loop-red-w-1.c: Likewise

[og8] Add __builtin_goacc_parlevel_{id,size}

2018-07-31 Thread Cesar Philippidis
__builtin_goacc_parlevel_{id,size} 2018-07-31 Cesar Philippidis Backport from mainline: 2018-05-02 Tom de Vries PR libgomp/82428 gcc/ * builtins.def (DEF_GOACC_BUILTIN_ONLY): Define. * omp-builtins.def (BUILT_IN_GOACC_PARLEVEL_ID) (BUILT_IN_GOACC_PARLEVEL_SIZE): New builtin. * builtins.c

[PATCH,nvptx] Truncate config/nvptx/oacc-parallel.c

2018-07-31 Thread Cesar Philippidis
bootstrapped and regtested for x86_64 with nvptx offloading. Thanks, Cesar [PATCH] [libgomp] Truncate config/nvptx/oacc-parallel.c 2018-XX-YY Cesar Philippidis Thomas Schwinge libgomp/ * config/nvptx/oacc-parallel.c: Truncate. (cherry picked from gomp-4_0-branch r228836) --- libgomp

[PATCH,nvptx] Remove use of CUDA unified memory in libgomp

2018-07-31 Thread Cesar Philippidis
for trunk? I bootstrapped and regression tested it for x86_64 with nvptx offloading. Thanks, Cesar [PATCH] [nvptx] Remove use of CUDA unified memory in libgomp 2018-XX-YY Cesar Philippidis libgomp/ * plugin/plugin-nvptx.c (struct cuda_map): New. (struct ptx_stream): Replace d, h, h_begin

[PATCH,nvptx] Remove use of 'struct map' from plugin (nvptx)

2018-07-31 Thread Cesar Philippidis
[PATCH] Remove use of 'struct map' from plugin (nvptx) 2018-XX-YY Cesar Philippidis James Norris libgomp/ * plugin/plugin-nvptx.c (struct map): Removed. (map_init, map_pop): Remove use of struct map. (map_push): Likewise and change argument list. * testsuite/libgomp.oacc-c-c

[PATCH,nvptx] Use CUDA driver API to select default runtime launch, geometry

2018-07-31 Thread Cesar Philippidis
would make a better default for older versions of CUDA, but that's a patch for another day. Is this patch OK for trunk? I bootstrapped and regression tested it using x86_64 with nvptx offloading. Thanks, Cesar [nvptx] Use CUDA driver API to select default runtime launch geometry 2018-XX-YY Cesar

Re: [libgomp, nvptx, committed] Calculate default dims per device

2018-07-30 Thread Cesar Philippidis
On 07/30/2018 03:19 AM, Tom de Vries wrote: > > [libgomp, nvptx] Calculate default dims per device > > The default dimensions are calculated using per-device properties, but > initialized once and used on all devices. > > This patch fixes this problem by introducing per-device default

Re: [PATCH 0/8] Reduce/remove dependencies on _GLIBCXX_USE_C99_STDINT_TR1

2018-07-26 Thread Cesar Philippidis
On 07/26/2018 07:01 AM, jwak...@redhat.com wrote: > From: Jonathan Wakely It looks like you're using git send-email for this patch series. And it seems like you made the same mistake that I did when you configured git sendmail.from. According to the git sent-email manpage, from should be your

Re: [patch] adjust default nvptx launch geometry for OpenACC offloaded regions

2018-07-26 Thread Cesar Philippidis
Hi Tom, I see that you're reviewing the libgomp changes. Please disregard the following hunk: On 07/11/2018 12:13 PM, Cesar Philippidis wrote: > @@ -1199,12 +1202,59 @@ nvptx_exec (void (*fn), size_t mapnum, void > **hostaddrs, void **devaddrs, >def

Re: [PATCH 3/3] Add user-friendly OpenACC diagnostics regarding detected parallelism.

2018-07-26 Thread Cesar Philippidis
On 07/26/2018 01:33 AM, Richard Biener wrote: > On Wed, Jul 25, 2018 at 5:30 PM Cesar Philippidis > wrote: >> >> This patch teaches GCC to inform the user how it assigned parallelism >> to each OpenACC loop at compile time using the -fopt-info-note-omp >> fla

Re: [PATCH 00/11] [nvptx] Initial vector length changes

2018-07-25 Thread Cesar Philippidis
On 07/24/2018 01:47 PM, ce...@codesourcery.com wrote: > From: Cesar Philippidis > > This patch series contains various cleanups and structural > reorganizations to the NVPTX BE in preparation for the forthcoming > variable length vector length enhancements. Tom, in order to make

Re: [PATCH 1/3] Correct the reported line number in fortran combined OpenACC directives

2018-07-25 Thread Cesar Philippidis
On 07/25/2018 08:32 AM, Marek Polacek wrote: > On Wed, Jul 25, 2018 at 08:29:17AM -0700, Cesar Philippidis wrote: >> The fortran FE incorrectly records the line locations of combined acc >> loop directives when it lowers the construct to gimple. Usually this >> isn't a proble

[PATCH 3/3] Add user-friendly OpenACC diagnostics regarding detected parallelism.

2018-07-25 Thread Cesar Philippidis
to distinguish which parallelism was specified by the user and which was assigned by the compiler. But that can be added in a follow up patch. Is this patch OK for trunk? I bootstrapped and regtested it for x86_64 with nvptx offloading. Thanks, Cesar 2018-XX-YY Cesar Philippidis gcc

[PATCH 2/3] Correct the reported line number in c++ combined OpenACC directives

2018-07-25 Thread Cesar Philippidis
to resolve a couple of long standing diagnostics discrepancies between the c/c++ FEs in the test suite. Is this patch OK for trunk? I bootstrapped and regtested using x86_64 with nvptx offloading. Thanks, Cesar 2018-XX-YY Cesar Philippidis gcc/cp/ * parser.c

[PATCH 1/3] Correct the reported line number in fortran combined OpenACC directives

2018-07-25 Thread Cesar Philippidis
offloading. Thanks, Cesar 2018-XX-YY Cesar Philippidis gcc/fortran/ * trans-openmp.c (gfc_trans_oacc_combined_directive): Set the location of combined acc loops. (cherry picked from gomp-4_0-branch r245653) diff --git a/gcc/fortran/trans-openmp.c b/gcc/fortran/trans-openmp.c

[PATCH 0/3] Add OpenACC diagnostics to -fopt-info-note-omp

2018-07-25 Thread Cesar Philippidis
This patch series extends -fopt-info-note-omp to include OpenACC loop diagnostics when it is used in conjunction with -fopenacc. At present, the diagnostics are limited to reporting how OpenACC loops are partitioned, e.g., seq, gang, worker or vector. The major advantage of this diagnostics is

[PATCH] Adjust offsets for present data clauses

2018-07-20 Thread Cesar Philippidis
/nvptx. Is it OK for trunk? Thanks, Cesar >From fb743d8a45193c177cb0082400d140949e8c1e6d Mon Sep 17 00:00:00 2001 From: Cesar Philippidis Date: Wed, 24 Aug 2016 00:02:50 + Subject: [PATCH 5/5] [libgomp, OpenACC] Adjust offsets for present data clauses 2018-XX-YY Cesar Philippidis

[PATCH] Enable firstprivate OpenACC reductions

2018-07-20 Thread Cesar Philippidis
rom: Cesar Philippidis Date: Wed, 31 Jan 2018 07:21:53 -0800 Subject: [PATCH 4/5] Enable firstprivate OpenACC reductions 2018-XX-YY Cesar Philippidis gcc/ * gimplify.c (omp_add_variable): Allow certain OpenACC reduction variables to remain firstprivate. gcc/testsuite/ * c-c++-common/go

[PATCH] Privatize independent OpenACC reductions

2018-07-20 Thread Cesar Philippidis
and regtested on x86_64/nvptx. Is it OK for trunk? Thanks, Cesar >From a4753e2b40cf3d707aabd7c9d5bad7d8f9be8b6f Mon Sep 17 00:00:00 2001 From: Cesar Philippidis Date: Fri, 26 Jan 2018 08:30:13 -0800 Subject: [PATCH 3/5] Privatize independent OpenACC reductions 2018-XX-YY Cesar Philippi

[PATCH] Add support for making maps 'private' inside OpenACC offloaded regions

2018-07-20 Thread Cesar Philippidis
2018-XX-YY Chung-Lin Tang Cesar Philippidis gcc/ * tree.h (OMP_CLAUSE_MAP_PRIVATE): Define macro. * gimplify.c (enum gimplify_omp_var_data): Add GOVD_MAP_PRIVATE enum value. (omp_add_variable): Add GOVD_MAP_PRIVATE to reduction clause flags if not a gang-partitioned loop

[PATCH] Fix PR70828 - broken array-type subarrays inside acc data, in OpenACC

2018-07-20 Thread Cesar Philippidis
gt; I bootstrapped and regtested on x86_64/nvptx. Is it OK for trunk? Thanks, Cesar >From 3a58144cfaca8f6e3a889346e736e68a9ed17e6a Mon Sep 17 00:00:00 2001 From: Cesar Philippidis Date: Thu, 18 Aug 2016 01:12:15 + Subject: [PATCH 1/5] Fix PR70828s "broken array-type subarrays inside acc da

Re: [patch] adjust default nvptx launch geometry for OpenACC offloaded regions

2018-07-11 Thread Cesar Philippidis
On 07/02/2018 07:14 AM, Tom de Vries wrote: > On 06/21/2018 03:58 PM, Cesar Philippidis wrote: >> On 06/20/2018 03:15 PM, Tom de Vries wrote: >>> On 06/20/2018 11:59 PM, Cesar Philippidis wrote: >>>> Now it follows the formula contained in >>>> the &quo

Re: [patch] adjust default nvptx launch geometry for OpenACC offloaded regions

2018-07-02 Thread Cesar Philippidis
On 07/02/2018 07:14 AM, Tom de Vries wrote: > On 06/21/2018 03:58 PM, Cesar Philippidis wrote: >> On 06/20/2018 03:15 PM, Tom de Vries wrote: >>> On 06/20/2018 11:59 PM, Cesar Philippidis wrote: >>>> Now it follows the formula contained in >>>> the &quo

Re: [patch] adjust default nvptx launch geometry for OpenACC offloaded regions

2018-06-29 Thread Cesar Philippidis
On 06/29/2018 10:12 AM, Cesar Philippidis wrote: > Ping. While porting the vector length patches to trunk, I realized that I mistakenly removed support for the environment variable GOMP_OPENACC_DIM in this patch (thanks for adding those test case Tom!). I'll post an updated version of this pa

[patch] Add OpenACC Fortran support for deviceptr and variable in common blocks

2018-06-29 Thread Cesar Philippidis
for trunk? It bootstrapped / regression tested cleanly for x86_64 with nvptx offloading. Thanks, Cesar 2018-06-29 Cesar Philippidis James Norris gcc/fortran/ * openmp.c (gfc_match_omp_map_clause): Re-write handling of the deviceptr clause. Add new common_blocks argument.

Re: [patch] various OpenACC reduction enhancements - test cases

2018-06-29 Thread Cesar Philippidis
Attached are the updated reductions tests cases. Again, these have been bootstrapped and regression tested cleanly for x86_64 with nvptx offloading. Is it OK for trunk? Thanks, Cesar 2018-06-29 Cesar Philippidis Nathan Sidwell gcc/testsuite/ * c-c++-common/goacc/orphan-reductions-1.c

Re: [patch] various OpenACC reduction enhancements - FE changes

2018-06-29 Thread Cesar Philippidis
Attaches are the FE changes for the OpenACC reduction enhancements. It depends on the ME patch. Is this patch OK for trunk? It bootstrapped / regression tested cleanly for x86_64 with nvptx offloading. Thanks, Cesar 2018-06-29 Cesar Philippidis Nathan Sidwell gcc/c/ * c-parser.c

Re: [patch] various OpenACC reduction enhancements - ME and nvptx changes

2018-06-29 Thread Cesar Philippidis
The attached patch includes the nvptx and GCC ME reductions enhancements. Is this patch OK for trunk? It bootstrapped / regression tested cleanly for x86_64 with nvptx offloading. Thanks, Cesar 2018-06-29 Cesar Philippidis Nathan Sidwell gcc/ * config/nvptx/nvptx.c

  1   2   3   4   5   6   7   >