[all-commits] [llvm/llvm-project] 5b3cfc: [OpenMP] Allocatable explicit member mapping fortr...

agozillon via All-commits all-commits at lists.llvm.org
Thu Nov 7 20:24:57 PST 2024


  Branch: refs/heads/users/agozillo/alloca-member-map-2
  Home:   https://github.com/llvm/llvm-project
  Commit: 5b3cfc1554da9e32badbf5525b163698d977087d
      https://github.com/llvm/llvm-project/commit/5b3cfc1554da9e32badbf5525b163698d977087d
  Author: agozillon <Andrew.Gozillon at amd.com>
  Date:   2024-11-07 (Thu, 07 Nov 2024)

  Changed paths:
    M offload/test/offloading/fortran/basic-target-region-1D-array-section.f90
    M offload/test/offloading/fortran/basic-target-region-3D-array-section.f90
    M offload/test/offloading/fortran/basic-target-region-3D-array.f90
    M offload/test/offloading/fortran/constant-arr-index.f90
    M offload/test/offloading/fortran/declare-target-vars-in-target-region.f90
    M offload/test/offloading/fortran/double-target-call-with-declare-target.f90
    M offload/test/offloading/fortran/dtype-array-constant-index-map.f90
    A offload/test/offloading/fortran/dtype-member-map-syntax-1.f90
    A offload/test/offloading/fortran/dtype-member-map-syntax-2.f90
    M offload/test/offloading/fortran/dump_map_tables.f90
    M offload/test/offloading/fortran/local-descriptor-map-regress.f90
    M offload/test/offloading/fortran/target-depend.f90
    M offload/test/offloading/fortran/target-map-all-common-block-members.f90
    A offload/test/offloading/fortran/target-map-alloca-dtype-alloca-array-of-dtype.f90
    A offload/test/offloading/fortran/target-map-alloca-dtype-alloca-array.f90
    A offload/test/offloading/fortran/target-map-alloca-dtype-and-alloca-array-v2.f90
    A offload/test/offloading/fortran/target-map-alloca-dtype-and-alloca-array.f90
    A offload/test/offloading/fortran/target-map-alloca-dtype-array-and-scalar.f90
    A offload/test/offloading/fortran/target-map-alloca-dtype-array-of-dtype.f90
    M offload/test/offloading/fortran/target-map-allocatable-array-section-1d-bounds.f90
    M offload/test/offloading/fortran/target-map-allocatable-array-section-3d-bounds.f90
    A offload/test/offloading/fortran/target-map-allocatable-dtype.f90
    M offload/test/offloading/fortran/target-map-allocatable-map-scopes.f90
    M offload/test/offloading/fortran/target-map-common-block.f90
    M offload/test/offloading/fortran/target-map-declare-target-link-common-block.f90
    M offload/test/offloading/fortran/target-map-derived-type-full-1.f90
    M offload/test/offloading/fortran/target-map-derived-type-full-2.f90
    M offload/test/offloading/fortran/target-map-derived-type-full-implicit-1.f90
    M offload/test/offloading/fortran/target-map-derived-type-full-implicit-2.f90
    M offload/test/offloading/fortran/target-map-double-large-nested-dtype-multi-member.f90
    M offload/test/offloading/fortran/target-map-double-nested-dtype-array-bounds.f90
    M offload/test/offloading/fortran/target-map-double-nested-dtype-double-array-bounds.f90
    M offload/test/offloading/fortran/target-map-double-nested-dtype-single-member.f90
    A offload/test/offloading/fortran/target-map-dtype-3d-alloca-array-with-bounds.f90
    A offload/test/offloading/fortran/target-map-dtype-alloca-and-non-alloca-array.f90
    A offload/test/offloading/fortran/target-map-dtype-alloca-array-and-non-alloca-dtype.f90
    A offload/test/offloading/fortran/target-map-dtype-alloca-array-of-dtype.f90
    A offload/test/offloading/fortran/target-map-dtype-alloca-array-with-bounds.f90
    A offload/test/offloading/fortran/target-map-dtype-allocatable-array.f90
    A offload/test/offloading/fortran/target-map-dtype-allocatable-scalar-and-array.f90
    M offload/test/offloading/fortran/target-map-dtype-arr-bounds-member-enter-exit-update.f90
    M offload/test/offloading/fortran/target-map-dtype-arr-bounds-member-enter-exit.f90
    M offload/test/offloading/fortran/target-map-dtype-explicit-individual-array-member.f90
    M offload/test/offloading/fortran/target-map-dtype-multi-explicit-array-3D-member-bounds.f90
    M offload/test/offloading/fortran/target-map-dtype-multi-explicit-array-member-bounds.f90
    M offload/test/offloading/fortran/target-map-dtype-multi-explicit-array-member.f90
    M offload/test/offloading/fortran/target-map-dtype-multi-explicit-member.f90
    M offload/test/offloading/fortran/target-map-enter-exit-allocatables.f90
    M offload/test/offloading/fortran/target-map-enter-exit-array-2.f90
    M offload/test/offloading/fortran/target-map-enter-exit-array-bounds.f90
    M offload/test/offloading/fortran/target-map-enter-exit-array.f90
    M offload/test/offloading/fortran/target-map-enter-exit-scalar.f90
    M offload/test/offloading/fortran/target-map-first-common-block-member.f90
    M offload/test/offloading/fortran/target-map-individual-dtype-member-map.f90
    M offload/test/offloading/fortran/target-map-large-nested-dtype-multi-member.f90
    M offload/test/offloading/fortran/target-map-mix-imp-exp-common-block-members.f90
    A offload/test/offloading/fortran/target-map-multi-alloca-dtypes-with-multi-alloca-members.f90
    A offload/test/offloading/fortran/target-map-multi-alloca-dtypes-with-multi-mixed-members.f90
    A offload/test/offloading/fortran/target-map-nested-alloca-dtype-3d-alloca-array-bounds.f90
    A offload/test/offloading/fortran/target-map-nested-alloca-dtype-alloca-array-bounds.f90
    A offload/test/offloading/fortran/target-map-nested-dtype-3d-alloca-array-with-bounds.f90
    A offload/test/offloading/fortran/target-map-nested-dtype-alloca-and-non-alloca-array.f90
    A offload/test/offloading/fortran/target-map-nested-dtype-alloca-array-and-non-alloca-dtype.f90
    A offload/test/offloading/fortran/target-map-nested-dtype-alloca-array-with-bounds.f90
    A offload/test/offloading/fortran/target-map-nested-dtype-alloca-array.f90
    M offload/test/offloading/fortran/target-map-nested-dtype-complex-member.f90
    M offload/test/offloading/fortran/target-map-nested-dtype-derived-member.f90
    M offload/test/offloading/fortran/target-map-nested-dtype-multi-member.f90
    M offload/test/offloading/fortran/target-map-nested-dtype-single-member.f90
    M offload/test/offloading/fortran/target-map-pointer-scopes-enter-exit.f90
    M offload/test/offloading/fortran/target-map-pointer-target-array-section-3d-bounds.f90
    M offload/test/offloading/fortran/target-map-pointer-target-scopes.f90
    A offload/test/offloading/fortran/target-map-pointer-to-dtype-allocatable-member.f90
    M offload/test/offloading/fortran/target-map-second-common-block-member.f90
    M offload/test/offloading/fortran/target-map-two-dtype-explicit-member.f90
    M offload/test/offloading/fortran/target-map-two-dtype-individual-member-array-1D-bounds.f90
    M offload/test/offloading/fortran/target-map-two-dtype-mixed-implicit-explicit-capture-1.f90
    M offload/test/offloading/fortran/target-map-two-dtype-mixed-implicit-explicit-capture-2.f90
    M offload/test/offloading/fortran/target-map-two-dtype-multi-member-array-1D-bounds.f90
    M offload/test/offloading/fortran/target-map-two-nested-dtype-member-array-map.f90
    M offload/test/offloading/fortran/target-nested-target-data.f90
    M offload/test/offloading/fortran/target-region-implicit-array.f90

  Log Message:
  -----------
  [OpenMP] Allocatable explicit member mapping fortran offloading tests

This PR is one in a series of 3 that aim to add support for explicit member mapping of
allocatable components in derived types within OpenMP+Fortran for Flang.

This PR provides all of the runtime tests that are currently upstreamable, unfortunately
some of the other tests would require linking of the fortran runtime for offload which
we currently do not do. But regardless, this is plenty to ensure that the mapping is
working in most cases.


  Commit: d0373c841db06b7ea069e4f1846cb2b81e730b2a
      https://github.com/llvm/llvm-project/commit/d0373c841db06b7ea069e4f1846cb2b81e730b2a
  Author: agozillon <Andrew.Gozillon at amd.com>
  Date:   2024-11-07 (Thu, 07 Nov 2024)

  Changed paths:
    M mlir/include/mlir/Dialect/OpenMP/OpenMPOps.td
    M mlir/lib/Dialect/OpenMP/IR/OpenMPDialect.cpp
    M mlir/lib/Target/LLVMIR/Dialect/OpenMP/OpenMPToLLVMIRTranslation.cpp
    M mlir/test/Dialect/OpenMP/ops.mlir
    R mlir/test/Target/LLVMIR/omptarget-fortran-allocatable-types-host.mlir
    A mlir/test/Target/LLVMIR/omptarget-nested-ptr-record-type-mapping-host.mlir
    M mlir/test/Target/LLVMIR/omptarget-nested-record-type-mapping-host.mlir
    A mlir/test/Target/LLVMIR/omptarget-record-type-with-ptr-member-host.mlir

  Log Message:
  -----------
  [OpenMP][MLIR] Descriptor explicit member map lowering changes

This is one of 3 PRs in a PR stack that aims to add support for explicit mapping of
allocatable members in derived types.

The primary changes in this PR are the OpenMPToLLVMIRTranslation.cpp changes,
which are small and seek to alter the current member mapping to add an
additional map insertion for pointers. Effectively, if the member is a pointer
(currently indicated by having a varPtrPtr field) we add an additional map for
the pointer and then alter the subsequent mapping of the member (the data)
to utilise the member rather than the parents base pointer. This appears to be
necessary in certain cases when mapping pointer data within record types to
avoid segfaulting on device (due to incorrect data mapping). In general this
record type mapping may be simplifiable in the future.

There are also additions of tests which should help to showcase the affect
of the changes above.


Compare: https://github.com/llvm/llvm-project/compare/70265b81b3e8...d0373c841db0

To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list