mbox series

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

Message ID 20240612114223.2206735-1-ams@baylibre.com
Headers show
Series libgomp: OpenMP pinned memory for omp_alloc | expand

Message

Andrew Stubbs June 12, 2024, 11:42 a.m. UTC
This patch series is a rework of the v4 series I posted in May:

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

This adds a new patch (1/6) that adjusts criticisms of the testcases
that were already committed. The same issues have been fixed in the new
testcases included in the rest of the series.

Otherwise, I've address comments regarding the enum values, naming,
and implemented previously missed cases in the environment variables and
parsers.

OK for mainline?

Andrew

Andrew Stubbs (6):
  libgomp: change alloc-pinned tests failure mode
  libgomp, openmp: Add ompx_gnu_pinned_mem_alloc
  openmp: Add -foffload-memory
  openmp: -foffload-memory=pinned
  libgomp, nvptx: Cuda pinned memory
  libgomp: fine-grained pinned memory allocator

 gcc/common.opt                                |  16 +
 gcc/coretypes.h                               |   7 +
 gcc/doc/invoke.texi                           |  16 +-
 gcc/fortran/openmp.cc                         |  11 +-
 gcc/omp-builtins.def                          |   3 +
 gcc/omp-low.cc                                |  66 ++++
 .../gfortran.dg/gomp/allocate-pinned-1.f90    |  16 +
 libgomp/Makefile.am                           |   2 +-
 libgomp/Makefile.in                           |   7 +-
 libgomp/allocator.c                           | 115 +++++--
 libgomp/config/linux/allocator.c              | 206 +++++++++--
 libgomp/env.c                                 |   1 +
 libgomp/libgomp-plugin.h                      |   2 +
 libgomp/libgomp.h                             |  14 +
 libgomp/libgomp.map                           |   1 +
 libgomp/libgomp.texi                          |  18 +-
 libgomp/libgomp_g.h                           |   1 +
 libgomp/omp.h.in                              |   1 +
 libgomp/omp_lib.f90.in                        |   2 +
 libgomp/omp_lib.h.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  |  46 ++-
 libgomp/testsuite/libgomp.c/alloc-pinned-2.c  |  46 ++-
 libgomp/testsuite/libgomp.c/alloc-pinned-3.c  |  45 ++-
 libgomp/testsuite/libgomp.c/alloc-pinned-4.c  |  44 ++-
 libgomp/testsuite/libgomp.c/alloc-pinned-5.c  | 126 +++++++
 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  | 122 +++++++
 .../libgomp.fortran/alloc-pinned-1.f90        |  16 +
 libgomp/usmpin-allocator.c                    | 319 ++++++++++++++++++
 33 files changed, 1550 insertions(+), 118 deletions(-)
 create mode 100644 gcc/testsuite/gfortran.dg/gomp/allocate-pinned-1.f90
 create mode 100644 libgomp/testsuite/libgomp.c-c++-common/alloc-pinned-1.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