From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from esa3.mentor.iphmx.com (esa3.mentor.iphmx.com [68.232.137.180]) by sourceware.org (Postfix) with ESMTPS id 8585B3858010 for ; Tue, 29 Jun 2021 23:42:17 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 8585B3858010 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=codesourcery.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=mentor.com IronPort-SDR: H3ncGZXqeLVlZzpB4z4s5AlFlWPsEOcbJM4F6QxFlVr2Px49j/xfQkbHGDvmIxBXMI8ZUU/0Hi x9r4DS2WUtbpDFHrQNsN9TWDDJ0wJSXLA+JTARw46CVH7sT6wS9u8yeJeJPvBl/4PduPLfQzVI j44Aun9zRLmS2UfkwA2lnjS0NW5saNbNhjCPabmjyRi7w0AmCYS7tNQ/4y2vIGUMy7KR4UCSPB Jlku8NdYYRDd/v/4EwBGFXVDYM+jmcCn6oCnACdktp1y41mAH70XXQIgIHA82RNcyWAM7Zx2US Bus= X-IronPort-AV: E=Sophos;i="5.83,310,1616486400"; d="scan'208";a="62949875" Received: from orw-gwy-01-in.mentorg.com ([192.94.38.165]) by esa3.mentor.iphmx.com with ESMTP; 29 Jun 2021 15:42:16 -0800 IronPort-SDR: F0x7VIOatOEKIcD6Ilp9qj/ASq+GqEFef0KTNTUfImBMjCXLi1ZF773GqtX4cTjcOswHE7wYCr TQB/zM4v4h81s6xN0HKbb3s7GcLN1pT2xfXtNDDg4g0IkGcttFOJYnumPzxGoyZjyEtpoXuOL+ LTSldYyHLmBv11NzXY5skJGfwYn8/SiZvHMMdo7s1wraqXmgURXbMGsWekuB7cW8vaKHJ9ct7/ fjjU34WNa2zYZSEVU8q2iVzFlOabimMYxe8H5qfA+GFwDdLiXEzTpKA4PzhO9fAYrS68PHMIqG AS4= From: Julian Brown To: CC: Thomas Schwinge , Jakub Jelinek , Chung-Lin Tang Subject: [PATCH 0/4] openacc: Async fixes Date: Tue, 29 Jun 2021 16:42:00 -0700 Message-ID: X-Mailer: git-send-email 2.29.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Originating-IP: [137.202.0.90] X-ClientProxiedBy: SVR-IES-MBX-04.mgc.mentorg.com (139.181.222.4) To SVR-IES-MBX-04.mgc.mentorg.com (139.181.222.4) X-Spam-Status: No, score=-5.9 required=5.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS, KAM_DMARC_STATUS, SPF_HELO_PASS, SPF_PASS, TXREP autolearn=no autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 29 Jun 2021 23:42:19 -0000 This patch series contains fixes for various problems with async support for OpenACC at present: - Asynchonous host-to-device copies invoked from within libgomp (target.c) could copy bad data to the target -- and the workaround for that currently used in the AMD GCN target plugin could lead to a different problem (a race condition). - The OpenACC profiling-interface implementation did not measure asynchronous operations properly. - Several test cases misuse OpenACC asynchronous support (more race conditions). Further comments on individual patches. Tested with offloading to AMD GCN. OK for mainline? Thanks, Julian Julian Brown (4): openacc: Async fix for lib-94 testcase openacc: Fix async bugs in several OpenACC test cases openacc: Fix asynchronous host-to-device copies in libgomp runtime openacc: Profiling-interface fixes for asynchronous operations libgomp/libgomp.h | 2 +- libgomp/oacc-host.c | 5 +- libgomp/oacc-mem.c | 36 +++- libgomp/oacc-parallel.c | 190 ++++++++++++++---- libgomp/plugin/plugin-gcn.c | 20 +- libgomp/target.c | 111 ++++++---- .../acc_prof-init-1.c | 5 +- .../acc_prof-parallel-1.c | 64 ++---- .../libgomp.oacc-c-c++-common/deep-copy-10.c | 14 +- .../libgomp.oacc-c-c++-common/lib-94.c | 4 +- .../libgomp.oacc-fortran/lib-16-2.f90 | 5 + .../testsuite/libgomp.oacc-fortran/lib-16.f90 | 5 + 12 files changed, 289 insertions(+), 172 deletions(-) -- 2.29.2