From patchwork Tue Sep 10 17:41:41 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Julian Brown X-Patchwork-Id: 1160505 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=gcc.gnu.org (client-ip=209.132.180.131; helo=sourceware.org; envelope-from=gcc-patches-return-508786-incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=codesourcery.com Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b="nA6Vh4q+"; dkim-atps=neutral Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 46SXRM5Rm6z9s00 for ; Wed, 11 Sep 2019 03:42:22 +1000 (AEST) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:from :to:cc:subject:date:message-id:mime-version :content-transfer-encoding:content-type; q=dns; s=default; b=twv /jw12jeMIk+rmWIki+8PgizYZE47ctJdpEu/WHnJ3GcIQLCunk923T1lATZ/yV+p hUPD4DP7kDVZ2jEc0tkUWrVz8GsTJCPthEEvLSPvSmt8aWVua5tioBvPLq5nTubj kMvYzng4zwSWixxUDDcAyaFKJtH0hHLi26ECWU9I= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:from :to:cc:subject:date:message-id:mime-version :content-transfer-encoding:content-type; s=default; bh=YO1EpTfaT PrXMf5sSeCCp6Fj0Sc=; b=nA6Vh4q+fYjxtznyd9fvzK/GzwU5LxVifryHpQOH+ D5myrh0Qq/vtWkkA92n/v6Ep3akh8IkFFJr9oran46nff7mQhBVMOrEN/J/gOf6s CEgwOI4zIUWOtoQixu3nActWqmaVA6enxvLjw20uURL7fA4xAvqNXCkC6E6waEy6 CM= Received: (qmail 87096 invoked by alias); 10 Sep 2019 17:42:14 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org Received: (qmail 87087 invoked by uid 89); 10 Sep 2019 17:42:14 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-21.4 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, RCVD_IN_DNSWL_LOW, SPF_PASS autolearn=ham version=3.3.1 spammy=sk:changel, sk:ChangeL, shortly, device X-HELO: esa2.mentor.iphmx.com Received: from esa2.mentor.iphmx.com (HELO esa2.mentor.iphmx.com) (68.232.141.98) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 10 Sep 2019 17:42:13 +0000 IronPort-SDR: HML+PdmAhaiEbPhJHaeW2hPOpwYEqbVMbMqGOtc3rQA+UlqaV6lVub20ZTQBTm7u6FbimIET+t 6ArjXsvygejkBmPLqqYEdTcp35gu8vHqBZDTJvVA2IU4VYjC3ilIw2mnHg68JAweDnwRGZe9Fd nzPAjwTouq2vlEs+K00uj91RCmhEPi31wUZcdjWCpiTmm6+zVbpfGhLa5MZuId9E0ljGbQ5/KI 2mdR6o69/34lJTmVAJ73EKxlVyWVFdqt+8JWHPHSclroPe6wOejr4E/C1kRLWs9K4ZEz2GmRW3 AUA= Received: from orw-gwy-01-in.mentorg.com ([192.94.38.165]) by esa2.mentor.iphmx.com with ESMTP; 10 Sep 2019 09:41:59 -0800 IronPort-SDR: BZQHWCSjhl2Jvud38OJztBoaES2/TYVN4QJ+vro0sXcP0PNuV+mPEwg70WriDhIHJH036NbPEk N57BCFZ/SpqJMsRKUTOMKcGTa27KeLCspZ/BvSkyb1GFmfdnvSfypoixFjJDSG4Xvc+8S11VJ2 soNVSSjjFhGnUpJSffZJe7yWWujgEYv0duKxdRTvWb3MbCz2WOkjuCxM5lBMY6t65ma8u/tHIU CwzGl798PiACJrln4lthYRvuyZxT7jiWfJ2nQ1qcHIK88difGGCYOKc1FasaR/xdPWYkw4MBFl 6yg= From: Julian Brown To: CC: Andrew Stubbs Subject: [PATCH] [og9] Fix src_copy mismerge in GOMP_OFFLOAD_openacc_async_host2dev Date: Tue, 10 Sep 2019 10:41:41 -0700 Message-ID: <20190910174143.46888-1-julian@codesourcery.com> MIME-Version: 1.0 X-IsSubscribed: yes This patch fixes a typo in the GOMP_OFFLOAD_openacc_async_host2dev function that bypassed the temporary buffer used to hold source data for asynchronous host-to-device copies. Tested with offloading to AMD GCN. I will apply to the openacc-gcc-9-branch shortly. Thanks, Julian ChangeLog libgomp/ * plugin/plugin-gcn.c (GOMP_OFFLOAD_openacc_async_host2dev): Enqueue copy from src_copy not src. --- libgomp/ChangeLog.openacc | 5 +++++ libgomp/plugin/plugin-gcn.c | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/libgomp/ChangeLog.openacc b/libgomp/ChangeLog.openacc index 59605cd85bf..a15d4a0ed49 100644 --- a/libgomp/ChangeLog.openacc +++ b/libgomp/ChangeLog.openacc @@ -1,3 +1,8 @@ +2019-09-10 Julian Brown + + * plugin/plugin-gcn.c (GOMP_OFFLOAD_openacc_async_host2dev): Enqueue + copy from src_copy not src. + 2019-09-10 Kwok Cheung Yeung * config/gcn/team.c (gomp_gcn_exit_kernel): Free GCN thread list. diff --git a/libgomp/plugin/plugin-gcn.c b/libgomp/plugin/plugin-gcn.c index 9d03e4f9f5b..2b17204cd80 100644 --- a/libgomp/plugin/plugin-gcn.c +++ b/libgomp/plugin/plugin-gcn.c @@ -3613,7 +3613,7 @@ GOMP_OFFLOAD_openacc_async_host2dev (int device, void *dst, const void *src, But, that is probably correct. */ void *src_copy = GOMP_PLUGIN_malloc (n); memcpy (src_copy, src, n); - queue_push_copy (aq, dst, src, n, true); + queue_push_copy (aq, dst, src_copy, n, true); return true; }