public inbox for fortran@gcc.gnu.org
 help / color / mirror / Atom feed
From: Tobias Burnus <tobias@codesourcery.com>
To: Jakub Jelinek <jakub@redhat.com>,
	Marcel Vollweiler <marcel@codesourcery.com>
Cc: <gcc-patches@gcc.gnu.org>, <fortran@gcc.gnu.org>
Subject: Re: [PATCH] OpenMP, libgomp: Add new runtime routines omp_target_memcpy_async and omp_target_memcpy_rect_async
Date: Thu, 5 May 2022 12:25:18 +0200	[thread overview]
Message-ID: <8c42fb3e-aa8a-6cf8-d889-6ef0d80bf41a@codesourcery.com> (raw)
In-Reply-To: <YnOLHQyU2E9k4Rna@tucnak>

On 05.05.22 10:30, Jakub Jelinek via Fortran wrote:
>> +  memcpy_t *a = args;
>> +  int ret = omp_target_memcpy_copy (a->dst, a->src, a->length, a->dst_offset,
>> +                                a->src_offset, a->dst_devicep,
>> +                                a->src_devicep);
>> +  if (ret)
>> +    gomp_fatal ("asynchronous memcpy failed");

I wonder whether that should be 'omp_target_memcpy_async failed' or
similar to make clear that it comes from a user's API call.

Or "asynchronous memcpy API routine failed" to avoid a bit the issue of
...memcpy_async vs. ..._memcpy_rect_aysnc?

> I'm not really sure killing the whole program if the copying failed is the
> best action.  Has it been discussed on omp-lang?  Perhaps the APIs should
> have a way how to propagate the result to the caller when it completes
> somehow?

I think it hasn't been discussed – but the question is how to handle it
best with the current API. Namely, should it simply continue at the
taskwait? Having some way to communicate back that it failed would be
useful – either by a by-reference argument or some other more indirect
means.

I think aborting it bad – but not aborting and silently continuing is
likely to break as well. IMO, we the fatal is fine for now, but we might
need to come up with something on the spec side.

Tobias
-----------------
Siemens Electronic Design Automation GmbH; Anschrift: Arnulfstraße 201, 80634 München; Gesellschaft mit beschränkter Haftung; Geschäftsführer: Thomas Heurung, Frank Thürauf; Sitz der Gesellschaft: München; Registergericht München, HRB 106955

  reply	other threads:[~2022-05-05 10:25 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-21 11:19 Marcel Vollweiler
2022-05-05  8:30 ` Jakub Jelinek
2022-05-05 10:25   ` Tobias Burnus [this message]
     [not found]   ` <d549a138-c8f2-098b-39b1-c742cef5c534@codesourcery.com>
     [not found]     ` <YoPks36yV4Fbpb1m@tucnak>
2022-05-19  8:39       ` Marcel Vollweiler
2022-05-19  8:47         ` 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=8c42fb3e-aa8a-6cf8-d889-6ef0d80bf41a@codesourcery.com \
    --to=tobias@codesourcery.com \
    --cc=fortran@gcc.gnu.org \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=jakub@redhat.com \
    --cc=marcel@codesourcery.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).