public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Chung-Lin Tang <cltang@codesourcery.com>
To: gcc-patches <gcc-patches@gcc.gnu.org>
Cc: Jakub Jelinek <jakub@redhat.com>,
	Thomas Schwinge	<thomas_schwinge@mentor.com>,
	Cesar Philippidis	<cesar_philippidis@mentor.com>,
	Julian Brown <julian@codesourcery.com>
Subject: Re: [PATCH, libgomp] Rewire OpenACC async
Date: Sat, 16 Apr 2016 07:41:00 -0000	[thread overview]
Message-ID: <d37ca1c5-c8ed-5464-9660-7269f1460615@codesourcery.com> (raw)
In-Reply-To: <57078FDD.8020908@codesourcery.com>

Ping.

On 2016/4/8 07:02 PM, Chung-Lin Tang wrote:
> Ping.
> 
> On 2016/3/29 5:48 PM, Chung-Lin Tang wrote:
>> I've updated this patch for trunk (as attached), and re-tested without
>> regressions. This patch is still a fix for libgomp.oacc-c-c++-common/asyncwait-1.c,
>> which FAILs right now.
>>
>> ChangeLog is still as before. Is this okay for trunk?
>>
>> Thanks,
>> Chung-Lin
>>
>> On 2015/12/22 4:58 PM, Chung-Lin Tang wrote:
>>> Ping.
>>>
>>> On 2015/11/24 6:27 PM, Chung-Lin Tang wrote:
>>>> Hi, this patch reworks some of the way that asynchronous copyouts are
>>>> implemented for OpenACC in libgomp.
>>>>
>>>> Before this patch, we had a somewhat confusing way of implementing this
>>>> by having two refcounts for each mapping: refcount and async_refcount,
>>>> which I never got working again after the last wave of async regressions
>>>> showed up.
>>>>
>>>> So this patch implements what I believe to be a simplification: async_refcount
>>>> is removed, and instead of trying to queue the async copyouts during unmapping
>>>> we actually do that during the plugin event handling. This requires a addition
>>>> of the async stream integer as an argument to the register_async_cleanup
>>>> plugin hook, but overall I think this should be more elegant than before.
>>>>
>>>> This patch fixes the libgomp.oacc-c-c++-common/asyncwait-1.c regression.
>>>> It also fixed data-[23].c regressions before, but some other recent check-in
>>>> happened to already fixed those.
>>>>
>>>> Tested without regressions, is this okay for trunk?
>>>>
>>>> Thanks,
>>>> Chung-Lin
>>>>
>>>> 2015-11-24  Chung-Lin Tang  <cltang@codesourcery.com>
>>>>
>>>>         * oacc-plugin.h (GOMP_PLUGIN_async_unmap_vars): Add int parameter.
>>>>         * oacc-plugin.c (GOMP_PLUGIN_async_unmap_vars): Add 'int async'
>>>>         parameter, use to set async stream around call to gomp_unmap_vars,
>>>>         call gomp_unmap_vars() with 'do_copyfrom' set to true.
>>>>         * plugin/plugin-nvptx.c (struct ptx_event): Add 'int val' field.
>>>>         (event_gc): Adjust event handling loop, collect PTX_EVT_ASYNC_CLEANUP
>>>>         events and call GOMP_PLUGIN_async_unmap_vars() for each of them.
>>>>         (event_add): Add int parameter, initialize 'val' field when
>>>>         adding new ptx_event struct.
>>>>         (nvptx_evec): Adjust event_add() call arguments.
>>>>         (nvptx_host2dev): Likewise.
>>>>         (nvptx_dev2host): Likewise.
>>>>         (nvptx_wait_async): Likewise.
>>>>         (nvptx_wait_all_async): Likewise.
>>>>         (GOMP_OFFLOAD_openacc_register_async_cleanup): Add async parameter,
>>>>         pass to event_add() call.
>>>>         * oacc-host.c (host_openacc_register_async_cleanup): Add 'int async'
>>>>         parameter.
>>>>         * oacc-mem.c (gomp_acc_remove_pointer): Adjust async case to
>>>>         call openacc.register_async_cleanup_func() hook.
>>>>         * oacc-parallel.c (GOACC_parallel_keyed): Likewise.
>>>>         * target.c (gomp_copy_from_async): Delete function.
>>>>         (gomp_map_vars): Remove async_refcount.
>>>>         (gomp_unmap_vars): Likewise.
>>>>         (gomp_load_image_to_device): Likewise.
>>>>         (omp_target_associate_ptr): Likewise.
>>>>         * libgomp.h (struct splay_tree_key_s): Remove async_refcount.
>>>>         (acc_dispatch_t.register_async_cleanup_func): Add int parameter.
>>>>         (gomp_copy_from_async): Remove.
>>>>
>>>
>>
> 

  reply	other threads:[~2016-04-16  7:41 UTC|newest]

Thread overview: 49+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-06-15 12:23 [gomp4.1] Add new versions of GOMP_target{,_data,_update} and GOMP_target_enter_exit_data Ilya Verbin
2015-06-15 14:30 ` Jakub Jelinek
2015-06-15 16:22   ` Ilya Verbin
2015-06-15 16:30     ` Jakub Jelinek
2015-06-15 19:54       ` Ilya Verbin
2015-06-15 19:58         ` Jakub Jelinek
2015-06-19 22:36           ` Ilya Verbin
2015-06-23 11:51             ` Ilya Verbin
2015-06-23 12:10               ` Jakub Jelinek
2015-06-23 14:55                 ` Ilya Verbin
2015-06-23 15:04                   ` Jakub Jelinek
2015-10-19 16:33                 ` OpenACC async clause regressions (was: [gomp4.1] Add new versions of GOMP_target{,_data,_update} and GOMP_target_enter_exit_data) Thomas Schwinge
2015-10-19 16:48                   ` Ilya Verbin
2015-10-20  7:37                     ` Jakub Jelinek
2015-10-22 18:46                   ` [gomp4] " Thomas Schwinge
2015-11-18 15:18                     ` [gomp4] OpenACC async clause regressions Tom de Vries
2016-03-30 16:32                       ` Thomas Schwinge
2015-11-24 10:32                   ` [PATCH, libgomp] Rewire OpenACC async Chung-Lin Tang
2015-11-23 13:21                     ` [PATCH, C++] Wrap OpenACC wait in EXPR_STMT Chung-Lin Tang
     [not found]                       ` <56628C72.9040802@codesourcery.com>
2015-11-23 11:13                         ` [gomp4] Adjust Fortran OACC async lib test Chung-Lin Tang
2015-12-02  9:21                           ` Chung-Lin Tang
2015-12-08 11:46                           ` Thomas Schwinge
2015-12-02  9:22                       ` [PATCH, C++] Wrap OpenACC wait in EXPR_STMT Chung-Lin Tang
2015-12-03  8:51                       ` Thomas Schwinge
2015-12-03  8:59                         ` Thomas Schwinge
2015-12-03 10:05                           ` Chung-Lin Tang
2015-12-03 10:11                             ` Jakub Jelinek
2015-12-03 10:33                               ` Chung-Lin Tang
2015-12-05  9:57                                 ` Chung-Lin Tang
2015-12-07  5:00                       ` Jason Merrill
2015-12-01 12:01                     ` [PATCH, libgomp] Rewire OpenACC async Julian Brown
2015-12-05  9:23                       ` Chung-Lin Tang
2015-12-22  8:59                     ` Chung-Lin Tang
2016-03-29 10:15                       ` Chung-Lin Tang
2016-04-08 11:03                         ` Chung-Lin Tang
2016-04-16  7:41                           ` Chung-Lin Tang [this message]
2016-05-11  6:47                             ` [PATCH, libgomp] Rewire OpenACC async (Ping x3) Chung-Lin Tang
2016-05-12 10:03                         ` [PATCH, libgomp] Rewire OpenACC async Jakub Jelinek
2016-05-12 10:47                           ` Thomas Schwinge
2016-05-12 10:56                             ` Jakub Jelinek
2016-05-17  8:57                               ` Chung-Lin Tang
2016-05-17  9:01                                 ` Jakub Jelinek
2016-05-18  9:40                                   ` Chung-Lin Tang
2016-05-18  9:50                                     ` Jakub Jelinek
2015-06-24 11:43               ` [gomp4.1] Add new versions of GOMP_target{,_data,_update} and GOMP_target_enter_exit_data Jakub Jelinek
2015-06-24 20:14                 ` Ilya Verbin
2015-06-24 20:21                   ` Jakub Jelinek
2015-10-13 14:50         ` Ilya Verbin
2015-10-13 19:27           ` Jakub Jelinek

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=d37ca1c5-c8ed-5464-9660-7269f1460615@codesourcery.com \
    --to=cltang@codesourcery.com \
    --cc=cesar_philippidis@mentor.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=jakub@redhat.com \
    --cc=julian@codesourcery.com \
    --cc=thomas_schwinge@mentor.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).