public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH 0/3] OpenACC 2.6 manual deep copy support (attach/detach)
@ 2018-11-10 17:11 Julian Brown
  2018-11-10 17:11 ` [PATCH 1/3] Host-to-device transfer coalescing & magic offset value self-documentation Julian Brown
                   ` (2 more replies)
  0 siblings, 3 replies; 81+ messages in thread
From: Julian Brown @ 2018-11-10 17:11 UTC (permalink / raw)
  To: gcc-patches; +Cc: fortran, Catherine_Moore, thomas_schwinge, jakub

[-- Attachment #1: Type: text/plain, Size: 5936 bytes --]


Hi,

This patch series adds support for OpenACC 2.6's "manual deep copy"
feature.  This consists of three main parts:

 * Variable lists in data clauses can specify members of structs (in
   C/C++) or derived types (in Fortran). In C/C++ we allow either "." or
   "->" to be used to select members of structs or pointers-to-structs
   respectively. Fortran uses "%", as in the base language.

 * Struct and derived type members that are pointers trigger new
   "attach" and "detach" operations. The typical supported case is for a
   struct to be copied verbatim to the target initially. Subsequently,
   attach operations can be used to rewrite pointers to host memory
   contained in the struct to point to device memory instead. In this
   way, structs (and derived types) can be used fairly naturally in
   offloaded code. The detach operation restores pointers to point to
   host memory, i.e. before the whole struct is copied verbatim back to
   the host again.

 * There are new explicit attach/detach clauses in all three supported
   languages, as well as new behaviour for existing clauses
   (copy/copyin/copyout, etc.) implementing the semantics described above.

For more details, see the OpenACC 2.6 spec, or the Deep Copy Attach and
Detach Technical Report (TR-16-1) on the OpenACC site.

The patches are split into three parts, the first two of which are
tangentially-related cleanups, and the third of which contains the bulk
of the changes. I'll write more about those in their respective emails.

This patch series relies on the libgomp async implementation rework done
by Chung-Lin, posted previously:

https://gcc.gnu.org/ml/gcc-patches/2018-09/msg01424.html

Julian Brown (3):
  Host-to-device transfer coalescing & magic offset value
    self-documentation
  Factor out duplicate code in gimplify_scan_omp_clauses
  OpenACC 2.6 manual deep copy support (attach/detach)

 gcc/c-family/c-pragma.h                            |   2 +
 gcc/c/c-parser.c                                   |  34 +-
 gcc/c/c-typeck.c                                   |  59 +++-
 gcc/cp/parser.c                                    |  38 +-
 gcc/cp/semantics.c                                 |  75 +++-
 gcc/fortran/gfortran.h                             |   2 +
 gcc/fortran/openmp.c                               | 145 +++++---
 gcc/fortran/trans-openmp.c                         |  78 ++++-
 gcc/gimplify.c                                     | 390 +++++++++++++--------
 gcc/omp-low.c                                      |   3 +
 gcc/testsuite/c-c++-common/goacc/mdc-1.c           |  54 +++
 gcc/testsuite/c-c++-common/goacc/mdc-2.c           |  62 ++++
 gcc/testsuite/g++.dg/goacc/mdc.C                   |  68 ++++
 gcc/testsuite/gfortran.dg/goacc/data-clauses.f95   |  38 +-
 gcc/testsuite/gfortran.dg/goacc/derived-types.f90  |  77 ++++
 .../gfortran.dg/goacc/enter-exit-data.f95          |  24 +-
 gcc/tree-pretty-print.c                            |   9 +
 include/gomp-constants.h                           |   8 +
 libgomp/libgomp.h                                  |  23 +-
 libgomp/libgomp.map                                |  10 +
 libgomp/oacc-async.c                               |   4 +-
 libgomp/oacc-int.h                                 |   2 +-
 libgomp/oacc-mem.c                                 |  86 ++++-
 libgomp/oacc-parallel.c                            | 220 +++++++++---
 libgomp/openacc.h                                  |   6 +
 libgomp/target.c                                   | 292 ++++++++++++---
 .../libgomp.oacc-c-c++-common/deep-copy-1.c        |  24 ++
 .../libgomp.oacc-c-c++-common/deep-copy-2.c        |  29 ++
 .../libgomp.oacc-c-c++-common/deep-copy-3.c        |  34 ++
 .../libgomp.oacc-c-c++-common/deep-copy-4.c        |  87 +++++
 .../libgomp.oacc-c-c++-common/deep-copy-5.c        |  81 +++++
 .../testsuite/libgomp.oacc-fortran/deep-copy-1.f90 |  35 ++
 .../testsuite/libgomp.oacc-fortran/deep-copy-2.f90 |  33 ++
 .../testsuite/libgomp.oacc-fortran/deep-copy-3.f90 |  34 ++
 .../testsuite/libgomp.oacc-fortran/deep-copy-4.f90 |  49 +++
 .../testsuite/libgomp.oacc-fortran/deep-copy-5.f90 |  57 +++
 .../testsuite/libgomp.oacc-fortran/deep-copy-6.f90 |  61 ++++
 .../testsuite/libgomp.oacc-fortran/deep-copy-7.f90 |  89 +++++
 .../testsuite/libgomp.oacc-fortran/deep-copy-8.f90 |  41 +++
 .../libgomp.oacc-fortran/derived-type-1.f90        |  28 ++
 .../testsuite/libgomp.oacc-fortran/update-2.f90    | 284 +++++++++++++++
 41 files changed, 2406 insertions(+), 369 deletions(-)
 create mode 100644 gcc/testsuite/c-c++-common/goacc/mdc-1.c
 create mode 100644 gcc/testsuite/c-c++-common/goacc/mdc-2.c
 create mode 100644 gcc/testsuite/g++.dg/goacc/mdc.C
 create mode 100644 gcc/testsuite/gfortran.dg/goacc/derived-types.f90
 create mode 100644 libgomp/testsuite/libgomp.oacc-c-c++-common/deep-copy-1.c
 create mode 100644 libgomp/testsuite/libgomp.oacc-c-c++-common/deep-copy-2.c
 create mode 100644 libgomp/testsuite/libgomp.oacc-c-c++-common/deep-copy-3.c
 create mode 100644 libgomp/testsuite/libgomp.oacc-c-c++-common/deep-copy-4.c
 create mode 100644 libgomp/testsuite/libgomp.oacc-c-c++-common/deep-copy-5.c
 create mode 100644 libgomp/testsuite/libgomp.oacc-fortran/deep-copy-1.f90
 create mode 100644 libgomp/testsuite/libgomp.oacc-fortran/deep-copy-2.f90
 create mode 100644 libgomp/testsuite/libgomp.oacc-fortran/deep-copy-3.f90
 create mode 100644 libgomp/testsuite/libgomp.oacc-fortran/deep-copy-4.f90
 create mode 100644 libgomp/testsuite/libgomp.oacc-fortran/deep-copy-5.f90
 create mode 100644 libgomp/testsuite/libgomp.oacc-fortran/deep-copy-6.f90
 create mode 100644 libgomp/testsuite/libgomp.oacc-fortran/deep-copy-7.f90
 create mode 100644 libgomp/testsuite/libgomp.oacc-fortran/deep-copy-8.f90
 create mode 100644 libgomp/testsuite/libgomp.oacc-fortran/derived-type-1.f90
 create mode 100644 libgomp/testsuite/libgomp.oacc-fortran/update-2.f90

-- 
1.8.1.1


^ permalink raw reply	[flat|nested] 81+ messages in thread

end of thread, other threads:[~2023-10-31 14:00 UTC | newest]

Thread overview: 81+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-11-10 17:11 [PATCH 0/3] OpenACC 2.6 manual deep copy support (attach/detach) Julian Brown
2018-11-10 17:11 ` [PATCH 1/3] Host-to-device transfer coalescing & magic offset value self-documentation Julian Brown
2018-12-21 10:56   ` libgomp/target.c magic constants self-documentation Thomas Schwinge
2019-05-29 14:48     ` Thomas Schwinge
2018-11-10 17:11 ` [PATCH 2/3] Factor out duplicate code in gimplify_scan_omp_clauses Julian Brown
2018-12-18 14:16   ` Julian Brown
2018-12-18 14:50   ` Jakub Jelinek
2018-11-10 17:12 ` [PATCH 3/3] OpenACC 2.6 manual deep copy support (attach/detach) Julian Brown
2018-11-11 17:04   ` Bernhard Reutner-Fischer
2018-11-30 11:41   ` [PATCH] " Julian Brown
2018-12-03 17:03     ` Julian Brown
2018-12-07 13:50     ` Jakub Jelinek
2018-12-10 19:42       ` Julian Brown
2018-12-13 10:57         ` Jakub Jelinek
2018-12-14 19:00           ` Julian Brown
2018-12-18 12:25             ` Jakub Jelinek
2018-12-22 13:37             ` Thomas Schwinge
2019-10-18 17:20         ` Thomas Schwinge
2019-11-06 18:44           ` Julian Brown
2019-11-22 23:54             ` Julian Brown
2019-11-25 10:53               ` Tobias Burnus
2019-11-26  2:54                 ` Julian Brown
2019-12-17 12:16                   ` Thomas Schwinge
2019-12-17 17:28                     ` [WIP] OpenACC 'acc_attach*', 'acc_detach*' runtime library routines (was: [PATCH] OpenACC 2.6 manual deep copy support (attach/detach)) Thomas Schwinge
2019-12-18  6:03                   ` [PATCH 00/13] OpenACC 2.6 manual deep copy support Julian Brown
2019-12-18  6:03                     ` [PATCH 02/13] OpenACC reference count overhaul Julian Brown
2020-05-19 15:42                       ` Thomas Schwinge
2020-06-04 18:13                         ` [OpenACC] Use 'tgt' returned from 'gomp_map_vars' (was: [PATCH 02/13] OpenACC reference count overhaul) Thomas Schwinge
2020-05-19 15:49                       ` [PATCH 02/13] OpenACC reference count overhaul Thomas Schwinge
2020-05-19 15:58                       ` Thomas Schwinge
2020-06-25 11:03                         ` Thomas Schwinge
2020-07-03 15:29                           ` Thomas Schwinge
2019-12-18  6:03                     ` [PATCH 03/13] OpenACC reference count consistency checking Julian Brown
2019-12-18  6:03                     ` [PATCH 01/13] Use aux struct in libgomp for infrequently-used/API-specific data Julian Brown
2019-12-18  6:04                     ` [PATCH 08/13] OpenACC 2.6 deep copy: middle-end parts Julian Brown
2019-12-21 21:51                       ` Thomas Schwinge
2019-12-18  6:04                     ` [PATCH 04/13] Use gomp_map_val for OpenACC host-to-device address translation Julian Brown
2019-12-18  6:04                     ` [PATCH 05/13] Factor out duplicate code in gimplify_scan_omp_clauses Julian Brown
2019-12-18  6:04                     ` [PATCH 09/13] OpenACC 2.6 deep copy: C and C++ front-end parts Julian Brown
2019-12-24  5:05                       ` Thomas Schwinge
2019-12-26 19:04                       ` Jason Merrill
2021-06-10 11:03                       ` Thomas Schwinge
2019-12-18  6:04                     ` [PATCH 06/13] OpenACC 2.6 deep copy: attach/detach API routines Julian Brown
2019-12-18  6:05                     ` [PATCH 13/13] Fortran polymorphic class-type support for OpenACC Julian Brown
2019-12-18  6:05                     ` [PATCH 11/13] OpenACC 2.6 deep copy: C and C++ execution tests Julian Brown
2020-06-04 18:43                       ` Fix 'sizeof' usage in 'libgomp.oacc-c-c++-common/deep-copy-{7, 8}.c' (was: [PATCH 11/13] OpenACC 2.6 deep copy: C and C++ execution tests) Thomas Schwinge
2023-10-31 14:00                       ` Add OpenACC 'acc_map_data' variant to 'libgomp.oacc-c-c++-common/deep-copy-8.c' " Thomas Schwinge
2019-12-18  6:05                     ` [PATCH 12/13] OpenACC 2.6 deep copy: Fortran execution tests Julian Brown
2019-12-18  6:05                     ` [PATCH 07/13] OpenACC 2.6 deep copy: libgomp parts Julian Brown
2019-12-21 23:37                       ` Thomas Schwinge
2020-01-03 12:26                         ` Julian Brown
2020-05-20  9:37                       ` Thomas Schwinge
2020-06-05 16:23                         ` [OpenACC 'exit data'] Simplify 'GOMP_MAP_STRUCT' handling (was: [PATCH 07/13] OpenACC 2.6 deep copy: libgomp parts) Thomas Schwinge
2020-06-05 16:36                         ` [OpenACC 'exit data'] Strip 'GOMP_MAP_STRUCT' mappings " Thomas Schwinge
2020-05-20 14:52                       ` [PATCH 07/13] OpenACC 2.6 deep copy: libgomp parts Thomas Schwinge
2020-05-20 19:11                         ` Julian Brown
2020-06-04 18:35                           ` [OpenACC] Repair/restore 'is_tgt_unmapped' checking (was: [PATCH 07/13] OpenACC 2.6 deep copy: libgomp parts) Thomas Schwinge
2020-06-04 18:53                       ` [PATCH 07/13] OpenACC 2.6 deep copy: libgomp parts Thomas Schwinge
2020-06-05 10:39                       ` Thomas Schwinge
2020-06-05 20:28                         ` Julian Brown
2020-06-05 11:17                       ` Thomas Schwinge
2020-06-05 20:31                         ` Julian Brown
2020-06-09 10:41                           ` OpenACC 'attach'/'detach' has no business affecting user-visible reference counting (was: [PATCH 07/13] OpenACC 2.6 deep copy: libgomp parts) Thomas Schwinge
2020-06-09 12:23                             ` Julian Brown
2020-06-18 18:21                             ` Julian Brown
2020-07-16  8:35                               ` OpenACC 'attach'/'detach' has no business affecting user-visible reference counting Thomas Schwinge
2020-06-26  9:20                       ` [PATCH 07/13] OpenACC 2.6 deep copy: libgomp parts Thomas Schwinge
2020-07-16  9:35                         ` Thomas Schwinge
2020-07-16 21:21                           ` Julian Brown
2020-07-17  9:12                             ` Thomas Schwinge
2020-06-30 15:58                       ` Thomas Schwinge
2019-12-18  7:20                     ` [PATCH 10/13] OpenACC 2.6 deep copy: Fortran front-end parts Julian Brown
2019-12-18 23:30                       ` Tobias Burnus
2019-12-20 12:25                         ` [committed] Improve is-coindexed check for OpenACC/OpenMP (was: [PATCH 10/13] OpenACC 2.6 deep copy: Fortran front-end parts) Tobias Burnus
2019-12-20 13:25                         ` [PATCH 10/13] OpenACC 2.6 deep copy: Fortran front-end parts Tobias Burnus
2019-12-20 10:08                       ` [patch,committed] Fix testsuite-fallout of OpenACC deep-copy patch (was: [PATCH 10/13] OpenACC 2.6 deep copy: Fortran front-end parts) Tobias Burnus
2019-12-18 18:24                     ` [PATCH 00/13] OpenACC 2.6 manual deep copy support Thomas Schwinge
2019-12-20  1:21                       ` Julian Brown
2019-12-20 14:36                     ` OpenACC regression and development pace Thomas Koenig
2020-06-04 18:07                     ` [OpenACC] XFAIL behavior of over-eager 'finalize' clause (was: [PATCH 00/13] OpenACC 2.6 manual deep copy support) Thomas Schwinge
2019-12-17 16:53             ` In 'libgomp/target.c', 'struct splay_tree_key_s', use 'struct splay_tree_aux' for infrequently-used or API-specific data (was: [PATCH] OpenACC 2.6 manual deep copy support (attach/detach)) Thomas Schwinge

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).