[all-commits] [llvm/llvm-project] 12aad1: [OpenMP] Support for global variables when in auto...

carlobertolli via All-commits all-commits at lists.llvm.org
Tue Feb 6 13:08:44 PST 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 12aad1a53c7ae70b88e7cb3fa3d04b6a3532f669
      https://github.com/llvm/llvm-project/commit/12aad1a53c7ae70b88e7cb3fa3d04b6a3532f669
  Author: carlobertolli <carlo.bertolli at amd.com>
  Date:   2024-02-06 (Tue, 06 Feb 2024)

  Changed paths:
    M openmp/libomptarget/src/omptarget.cpp
    A openmp/libomptarget/test/mapping/auto_zero_copy_globals.cpp

  Log Message:
  -----------
  [OpenMP] Support for global variables when in auto zero-copy. (#80876)

When building without unified_shared_memory, global variables are
declared in the device binary and allocated upon loading onto GPU
memory. However, when running in zero-copy mode (same as with
unified_shared_memory) D2H and H2D copies for mapped local and global
variables are turned off. This patch turns back on H2D and D2H copies
when they refer to global variables, enabling an application built
without unified_shared_memory to work correctly with global variables
when run under automatic zero-copy.

Co-authored-by: Doru Bercea <doru.bercea at amd.com>
Co-authored-by: Jan-Patrick Lehr <janpatrick.lehr at amd.com>




More information about the All-commits mailing list