[v3,0/6] libgomp: OpenMP pinned memory omp_alloc

Message ID 20231211170405.2538247-1-ams@codesourcery.com
Headers
Series libgomp: OpenMP pinned memory omp_alloc |

Message

Andrew Stubbs Dec. 11, 2023, 5:03 p.m. UTC
  This patch series is a rework of the v2 series I posted in August:

https://patchwork.sourceware.org/project/gcc/list/?series=23763&state=%2A&archive=both

This version addresses most of the review comments from Tobias, but
after discussion with Tobias and Thomas we've decided to skip the
nice-to-have proposed initialization improvement in the interest of
getting the job done, for now.

Otherwise, some bugs have been fixed and few other clean-ups have been
made, but the series retains the same purpose and structure.

This series no longer has any out-of-tree dependencies, now that the
low-latency allocator patch have been committed.

An older, less compact, version of these patches is already applied to
the devel/omp/gcc-13 (OG13) branch.

OK for mainline?

Andrew

Andrew Stubbs (5):
  libgomp: basic pinned memory on Linux
  libgomp, openmp: Add ompx_pinned_mem_alloc
  openmp: Add -foffload-memory
  openmp: -foffload-memory=pinned
  libgomp: fine-grained pinned memory allocator

Thomas Schwinge (1):
  libgomp, nvptx: Cuda pinned memory

 gcc/common.opt                                |  16 +
 gcc/coretypes.h                               |   7 +
 gcc/doc/invoke.texi                           |  16 +-
 gcc/omp-builtins.def                          |   3 +
 gcc/omp-low.cc                                |  66 ++++
 libgomp/Makefile.am                           |   2 +-
 libgomp/Makefile.in                           |   7 +-
 libgomp/allocator.c                           |  95 ++++--
 libgomp/config/gcn/allocator.c                |  21 +-
 libgomp/config/linux/allocator.c              | 243 +++++++++++++
 libgomp/config/nvptx/allocator.c              |  21 +-
 libgomp/libgomp-plugin.h                      |   2 +
 libgomp/libgomp.h                             |  14 +
 libgomp/libgomp.map                           |   1 +
 libgomp/libgomp.texi                          |  17 +-
 libgomp/libgomp_g.h                           |   1 +
 libgomp/omp.h.in                              |   1 +
 libgomp/omp_lib.f90.in                        |   2 +
 libgomp/plugin/plugin-nvptx.c                 |  42 +++
 libgomp/target.c                              | 136 ++++++++
 .../libgomp.c-c++-common/alloc-pinned-1.c     |  28 ++
 libgomp/testsuite/libgomp.c/alloc-pinned-1.c  | 141 ++++++++
 libgomp/testsuite/libgomp.c/alloc-pinned-2.c  | 146 ++++++++
 libgomp/testsuite/libgomp.c/alloc-pinned-3.c  | 189 +++++++++++
 libgomp/testsuite/libgomp.c/alloc-pinned-4.c  | 184 ++++++++++
 libgomp/testsuite/libgomp.c/alloc-pinned-5.c  | 129 +++++++
 libgomp/testsuite/libgomp.c/alloc-pinned-6.c  | 128 +++++++
 libgomp/testsuite/libgomp.c/alloc-pinned-7.c  |  63 ++++
 libgomp/testsuite/libgomp.c/alloc-pinned-8.c  | 127 +++++++
 .../libgomp.fortran/alloc-pinned-1.f90        |  16 +
 libgomp/usmpin-allocator.c                    | 319 ++++++++++++++++++
 31 files changed, 2127 insertions(+), 56 deletions(-)
 create mode 100644 libgomp/testsuite/libgomp.c-c++-common/alloc-pinned-1.c
 create mode 100644 libgomp/testsuite/libgomp.c/alloc-pinned-1.c
 create mode 100644 libgomp/testsuite/libgomp.c/alloc-pinned-2.c
 create mode 100644 libgomp/testsuite/libgomp.c/alloc-pinned-3.c
 create mode 100644 libgomp/testsuite/libgomp.c/alloc-pinned-4.c
 create mode 100644 libgomp/testsuite/libgomp.c/alloc-pinned-5.c
 create mode 100644 libgomp/testsuite/libgomp.c/alloc-pinned-6.c
 create mode 100644 libgomp/testsuite/libgomp.c/alloc-pinned-7.c
 create mode 100644 libgomp/testsuite/libgomp.c/alloc-pinned-8.c
 create mode 100644 libgomp/testsuite/libgomp.fortran/alloc-pinned-1.f90
 create mode 100644 libgomp/usmpin-allocator.c