[gcc/devel/omp/gcc-14] libgomp: Simplify OpenMP reverse offload host <-> device memory copy implementation

Paul-Antoine Arras parras@gcc.gnu.org
Fri Jun 28 09:52:54 GMT 2024


https://gcc.gnu.org/g:bb69f066430029ef6864286becefa4ee63b2a138

commit bb69f066430029ef6864286becefa4ee63b2a138
Author: Thomas Schwinge <thomas@codesourcery.com>
Date:   Tue Mar 21 16:14:16 2023 +0100

    libgomp: Simplify OpenMP reverse offload host <-> device memory copy implementation
    
    ... by using the existing 'goacc_asyncqueue' instead of re-coding parts of it.
    
    Follow-up to commit 131d18e928a3ea1ab2d3bf61aa92d68a8a254609
    "libgomp/nvptx: Prepare for reverse-offload callback handling",
    and commit ea4b23d9c82d9be3b982c3519fe5e8e9d833a6a8
    "libgomp: Handle OpenMP's reverse offloads".
    
            libgomp/
            * target.c (gomp_target_rev): Instead of 'dev_to_host_cpy',
            'host_to_dev_cpy', 'token', take a single 'goacc_asyncqueue'.
            * libgomp.h (gomp_target_rev): Adjust.
            * libgomp-plugin.c (GOMP_PLUGIN_target_rev): Adjust.
            * libgomp-plugin.h (GOMP_PLUGIN_target_rev): Adjust.
            * plugin/plugin-gcn.c (process_reverse_offload): Adjust.
            * plugin/plugin-nvptx.c (rev_off_dev_to_host_cpy)
            (rev_off_host_to_dev_cpy): Remove.
            (GOMP_OFFLOAD_run): Adjust.

Diff:
---
 libgomp/ChangeLog.omp | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/libgomp/ChangeLog.omp b/libgomp/ChangeLog.omp
index fc51f6b35a1..e586c90fb07 100644
--- a/libgomp/ChangeLog.omp
+++ b/libgomp/ChangeLog.omp
@@ -1,5 +1,15 @@
 2023-03-24  Thomas Schwinge  <thomas@codesourcery.com>
 
+	* target.c (gomp_target_rev): Instead of 'dev_to_host_cpy',
+	'host_to_dev_cpy', 'token', take a single 'goacc_asyncqueue'.
+	* libgomp.h (gomp_target_rev): Adjust.
+	* libgomp-plugin.c (GOMP_PLUGIN_target_rev): Adjust.
+	* libgomp-plugin.h (GOMP_PLUGIN_target_rev): Adjust.
+	* plugin/plugin-gcn.c (process_reverse_offload): Adjust.
+	* plugin/plugin-nvptx.c (rev_off_dev_to_host_cpy)
+	(rev_off_host_to_dev_cpy): Remove.
+	(GOMP_OFFLOAD_run): Adjust.
+
 	* target.c (gomp_unmap_vars_internal): Queue splay-tree keys for
 	removal after main loop.


More information about the Gcc-cvs mailing list