[all-commits] [llvm/llvm-project] 7b731f: [OpenMP][libomptarget] Delay restore of shadow poi...

carlobertolli via All-commits all-commits at lists.llvm.org
Fri Feb 18 08:09:36 PST 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 7b731f4d0bfbbac74210f59b782624662a3c7546
      https://github.com/llvm/llvm-project/commit/7b731f4d0bfbbac74210f59b782624662a3c7546
  Author: Carlo Bertolli <carlo.bertolli at amd.com>
  Date:   2022-02-18 (Fri, 18 Feb 2022)

  Changed paths:
    M openmp/libomptarget/src/omptarget.cpp

  Log Message:
  -----------
  [OpenMP][libomptarget] Delay restore of shadow pointers in structs to after H2D memory copies are completed

When using asynchronous plugin calls, shadow pointer restore could happen before the D2H copy for the entire struct has completed, effectively leaving a device pointer in a host struct.
This patch fixes the problem by delaying restore's to after a synchronization happens (target regions) and by calling early synchronization (target update).

Reviewed By: jdoerfert

Differential Revision: https://reviews.llvm.org/D119968




More information about the All-commits mailing list