This is the mail archive of the mailing list for the GCC project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [gomp4] Asynchronous data unmapping & wait fixes for OpenACC

Hi Julian!

On Fri, 17 Oct 2014 17:05:40 +0100, Julian Brown <> 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.


Attachment: pgpxb35Sv9tEL.pgp
Description: PGP signature

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]