[gomp4] Asynchronous data unmapping & wait fixes for OpenACC

Thomas Schwinge thomas@codesourcery.com
Mon Oct 20 10:17:00 GMT 2014


Hi Julian!

On Fri, 17 Oct 2014 17:05:40 +0100, Julian Brown <julian@codesourcery.com> wrote:
> This patch introduces a new plugin hook in libgomp to register a
> callback function to clean up host-side bookkeeping data after an
> asynchronous operation has completed (replacing the previous ad-hoc
> method used in the NVPTX backend), and adds code to ensure that same
> cleanup is done reliably in the NVPTX backend when the user program
> hits a "wait" directive, or equivalent.
> 
> OK for the gomp4 branch?

Yes, thanks.

>     libgomp/
>     * oacc-host.c (openacc_register_async_cleanup): New.
>     (host_dispatch): Initialise register_async_cleanup_func entry.
>     * oacc-int.h (struct ACC_dispatch_t): Add
>     register_async_cleanup_func hook.
>     * oacc-parallel.c (GOACC_parallel): Call
>     register_async_cleanup_func hook after queuing asynchronous
>     copy-back.
>     * plugin-nvptx.c (enum PTX_event_type): Add PTX_EVT_ASYNC_CLEANUP.
>     (struct PTX_event): Remove tgt field.
>     (event_gc): Don't do async cleanup in PTX_EVT_KNL, do it in
>     PTX_EVT_ASYNC_CLEANUP instead.
>     (event_add): Remove tgt argument. Support PTX_EVT_ASYNC_CLEANUP
>     events.
>     (PTX_exec, PTX_host2dev, PTX_dev2host, PTX_wait_async)
>     (PTX_wait_all_async): Update calls to event_add.
>     (openacc_register_async_cleanup): New.
>     (PTX_async_test): Call event_gc on success path.
>     (PTX_async_test_all): Likewise.
>     * target.c (gomp_load_plugin_for_device): Initialise
>     register_async_cleanup hook.


Grüße,
 Thomas
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 472 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20141020/24f308bb/attachment.sig>


More information about the Gcc-patches mailing list