public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH] [og9] Fix src_copy mismerge in GOMP_OFFLOAD_openacc_async_host2dev
@ 2019-09-10 17:42 Julian Brown
  0 siblings, 0 replies; only message in thread
From: Julian Brown @ 2019-09-10 17:42 UTC (permalink / raw)
  To: gcc-patches; +Cc: Andrew Stubbs

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  <julian@codesourcery.com>
+
+	* plugin/plugin-gcn.c (GOMP_OFFLOAD_openacc_async_host2dev): Enqueue
+	copy from src_copy not src.
+
 2019-09-10  Kwok Cheung Yeung  <kcy@codesourcery.com>
 
 	* 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;
 }
 
-- 
2.22.0

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2019-09-10 17:42 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-09-10 17:42 [PATCH] [og9] Fix src_copy mismerge in GOMP_OFFLOAD_openacc_async_host2dev Julian Brown

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).