From: Thomas Schwinge <thomas@codesourcery.com>
To: Chung-Lin Tang <cltang@codesourcery.com>
Cc: <gcc-patches@gcc.gnu.org>, Tom de Vries <tdevries@suse.de>
Subject: Re: [PATCH 6/6, OpenACC, libgomp] Async re-work, nvptx changes
Date: Thu, 06 Dec 2018 20:57:00 -0000 [thread overview]
Message-ID: <yxfppnue8jb6.fsf@hertz.schwinge.homeip.net> (raw)
In-Reply-To: <9523b49a-0454-e0a9-826d-5eeec2a8c973@mentor.com>
Hi Chung-Lin!
On Tue, 25 Sep 2018 21:11:58 +0800, Chung-Lin Tang <chunglin_tang@mentor.com> wrote:
> Hi Tom,
> this patch removes large portions of plugin/plugin-nvptx.c, since a lot of it is
> now in oacc-async.c now. The new code is essentially a NVPTX/CUDA-specific implementation
> of the new-style goacc_asyncqueues.
> --- a/libgomp/plugin/plugin-nvptx.c
> +++ b/libgomp/plugin/plugin-nvptx.c
> +struct goacc_asyncqueue *
> +GOMP_OFFLOAD_openacc_async_construct (void)
> +{
> + struct goacc_asyncqueue *aq
> + = GOMP_PLUGIN_malloc (sizeof (struct goacc_asyncqueue));
> + aq->cuda_stream = NULL;
> + CUDA_CALL_ASSERT (cuStreamCreate, &aq->cuda_stream, CU_STREAM_DEFAULT);
Curiously (this was the same in the code before): does this have to be
"CU_STREAM_DEFAULT" instead of "CU_STREAM_NON_BLOCKING", because we want
to block anything from running in parallel with "acc_async_sync" GPU
kernels, that use the "NULL" stream? (Not asking you to change this now,
but I wonder if this is overly strict?)
> + if (aq->cuda_stream == NULL)
> + GOMP_PLUGIN_fatal ("CUDA stream create NULL\n");
Can this actually happen, given the "CUDA_CALL_ASSERT" usage above?
> + CUDA_CALL_ASSERT (cuStreamSynchronize, aq->cuda_stream);
Why is the synchronization needed here?
> + return aq;
> +}
Grüße
Thomas
next prev parent reply other threads:[~2018-12-06 20:57 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-09-25 13:13 Chung-Lin Tang
2018-10-05 14:07 ` Tom de Vries
2018-12-06 20:57 ` Thomas Schwinge [this message]
2018-12-10 10:02 ` Chung-Lin Tang
2018-12-11 13:50 ` [PATCH 6/6, OpenACC, libgomp] Async re-work, nvptx changes (revised, v2) Chung-Lin Tang
2018-12-18 15:07 ` [PATCH 6/6, OpenACC, libgomp] Async re-work, nvptx changes (revised, v3) Chung-Lin Tang
2023-01-12 13:51 ` nvptx: Avoid deadlock in 'cuStreamAddCallback' callback, error case (was: [PATCH 6/6, OpenACC, libgomp] Async re-work, nvptx changes) Thomas Schwinge
2023-01-13 13:17 ` Chung-Lin Tang
2023-01-13 13:59 ` Thomas Schwinge
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=yxfppnue8jb6.fsf@hertz.schwinge.homeip.net \
--to=thomas@codesourcery.com \
--cc=cltang@codesourcery.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=tdevries@suse.de \
/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).