public inbox for fortran@gcc.gnu.org
 help / color / mirror / Atom feed
From: Christophe Lyon <christophe.lyon.oss@gmail.com>
To: Jakub Jelinek <jakub@redhat.com>
Cc: Marcel Vollweiler <marcel@codesourcery.com>,
	GCC Patches <gcc-patches@gcc.gnu.org>,
	 Tobias Burnus <Tobias_Burnus@mentor.com>,
	fortran@gcc.gnu.org
Subject: Re: [Patch v2] C, C++, Fortran, OpenMP: Add support for device-modifiers for 'omp target device'
Date: Wed, 1 Sep 2021 09:06:31 +0200	[thread overview]
Message-ID: <CAKhMtS+C2yq6sTtAKf0zgeh5M8_RVr-ydumhhXaFgkDsoBVvZg@mail.gmail.com> (raw)
In-Reply-To: <20210830062637.GH920497@tucnak>

On Mon, Aug 30, 2021 at 8:27 AM Jakub Jelinek via Gcc-patches <
gcc-patches@gcc.gnu.org> wrote:

> On Wed, Aug 25, 2021 at 12:14:09PM +0200, Marcel Vollweiler wrote:
> > Add support for device-modifiers for 'omp target device'.
> >
> > 'device_num' and 'ancestor' are now parsed on target device constructs
> for C,
> > C++, and Fortran (see OpenMP specification 5.0, p. 170). When 'ancestor'
> is
> >  used, then 'sorry, not supported' is output. Moreover, the restrictions
> for
> > 'ancestor' are implemented (see OpenMP specification 5.0, p. 174f).
> >
> > gcc/c/ChangeLog:
> >
> >       * c-parser.c (c_parser_omp_clause_device): Parse device-modifiers
> 'device_num'
> >       and 'ancestor' in 'target device' clauses.
> >
> > gcc/cp/ChangeLog:
> >
> >       * parser.c (cp_parser_omp_clause_device): Parse device-modifiers
> 'device_num'
> >       and 'ancestor' in 'target device' clauses.
> >       * semantics.c (finish_omp_clauses): Error handling. Constant
> device ids must
> >       evaluate to '1' if 'ancestor' is used.
> >
> > gcc/fortran/ChangeLog:
> >
> >       * gfortran.h: Add variable for 'ancestor' in struct
> gfc_omp_clauses.
> >       * openmp.c (gfc_match_omp_clauses): Parse device-modifiers
> 'device_num'
> >         and 'ancestor' in 'target device' clauses.
> >       * trans-openmp.c (gfc_trans_omp_clauses): Set
> OMP_CLAUSE_DEVICE_ANCESTOR.
> >
> > gcc/ChangeLog:
> >
> >       * gimplify.c (gimplify_scan_omp_clauses): Error handling.
> 'ancestor' only
> >       allowed on target constructs and only with particular other
> clauses.
> >       * omp-expand.c (expand_omp_target): Output of 'sorry, not
> supported' if
> >       'ancestor' is used.
> >       * omp-low.c (check_omp_nesting_restrictions): Error handling. No
> nested OpenMP
> >         structs when 'ancestor' is used.
> >       (scan_omp_1_stmt): No usage of OpenMP runtime routines in a target
> region when
> >       'ancestor' is used.
> >       * tree-pretty-print.c (dump_omp_clause): Append 'ancestor'.
> >       * tree.h (OMP_CLAUSE_DEVICE_ANCESTOR): Define macro.
> >
> > gcc/testsuite/ChangeLog:
> >
> >       * c-c++-common/gomp/target-device-1.c: New test.
> >       * c-c++-common/gomp/target-device-2.c: New test.
> >       * c-c++-common/gomp/target-device-ancestor-1.c: New test.
> >       * c-c++-common/gomp/target-device-ancestor-2.c: New test.
> >       * c-c++-common/gomp/target-device-ancestor-3.c: New test.
> >       * c-c++-common/gomp/target-device-ancestor-4.c: New test.
> >       * gfortran.dg/gomp/target-device-1.f90: New test.
> >       * gfortran.dg/gomp/target-device-2.f90: New test.
> >       * gfortran.dg/gomp/target-device-ancestor-1.f90: New test.
> >       * gfortran.dg/gomp/target-device-ancestor-2.f90: New test.
> >       * gfortran.dg/gomp/target-device-ancestor-3.f90: New test.
> >       * gfortran.dg/gomp/target-device-ancestor-4.f90: New test.
>

The last new test fails on aarch64:
 /gcc/testsuite/gfortran.dg/gomp/target-device-ancestor-4.f90:7:15: Error:
Sorry, 'reverse_offload' clause at (1) on REQUIRES directive is not yet
supported
compiler exited with status 1
PASS: gfortran.dg/gomp/target-device-ancestor-4.f90   -O   (test for
errors, line 7)
XFAIL: gfortran.dg/gomp/target-device-ancestor-4.f90   -O  sorry,
unimplemented: 'ancestor' not yet supported (test for warnings, line 9)
PASS: gfortran.dg/gomp/target-device-ancestor-4.f90   -O  (test for excess
errors)
gfortran.dg/gomp/target-device-ancestor-4.f90   -O  : dump file does not
exist
UNRESOLVED: gfortran.dg/gomp/target-device-ancestor-4.f90   -O
scan-tree-dump original "pragma omp target [^\n\r)]*device\\(ancestor:1\\)"

Can you fix it?

Thanks,

Christophe


> Ok, thanks.
>
>         Jakub
>
>

  reply	other threads:[~2021-09-01  7:06 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-07 17:59 [Patch] " Marcel Vollweiler
2021-07-20 13:30 ` Jakub Jelinek
     [not found]   ` <92ad1db1-c3ab-0482-0854-832804ed4ede@codesourcery.com>
     [not found]     ` <20210823174733.GY2380545@tucnak>
2021-08-25 10:14       ` [Patch v2] " Marcel Vollweiler
2021-08-30  6:26         ` Jakub Jelinek
2021-09-01  7:06           ` Christophe Lyon [this message]
2021-09-01  9:02             ` Jakub Jelinek
2021-09-02 12:09               ` Marcel Vollweiler
2021-09-02 12:11                 ` 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=CAKhMtS+C2yq6sTtAKf0zgeh5M8_RVr-ydumhhXaFgkDsoBVvZg@mail.gmail.com \
    --to=christophe.lyon.oss@gmail.com \
    --cc=Tobias_Burnus@mentor.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).