This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [gomp4 01/14] nvptx: emit kernels for 'omp target entrypoint' only for OpenACC
- From: Alexander Monakov <amonakov at ispras dot ru>
- To: Bernd Schmidt <bschmidt at redhat dot com>
- Cc: gcc-patches at gcc dot gnu dot org, Jakub Jelinek <jakub at redhat dot com>, Dmitry Melnik <dm at ispras dot ru>
- Date: Wed, 21 Oct 2015 08:39:01 +0300 (MSK)
- Subject: Re: [gomp4 01/14] nvptx: emit kernels for 'omp target entrypoint' only for OpenACC
- Authentication-results: sourceware.org; auth=none
- References: <1445366076-16082-1-git-send-email-amonakov at ispras dot ru> <1445366076-16082-2-git-send-email-amonakov at ispras dot ru> <5626D281 dot 4000909 at redhat dot com>
On Wed, 21 Oct 2015, Bernd Schmidt wrote:
> On 10/20/2015 08:34 PM, Alexander Monakov wrote:
> > The NVPTX backend emits each functions either as .func (callable only from
> > the
> > device code) or as .kernel (entry point for a parallel region). OpenMP
> > lowering adds "omp target entrypoint" attribute to functions outlined from
> > target regions. Unlike OpenACC offloading, OpenMP offloading does not
> > invoke
> > such outlined functions directly, but instead passes their address to
> > 'gomp_nvptx_main'. Restrict the special attribute treatment to OpenACC
> > only.
> >
> > * config/nvptx/nvptx.c (write_as_kernel): Additionally test
> > flag_openacc for "omp_target_entrypoint".
>
> I'm not too keen on this. The idea of the attribute is to make it a kernel
> that can be executed from the host. If that isn't wanted by OpenMP, it
> shouldn't set the attribute.
I do want the attribute in OpenMP, but I want to use the attribute
differently in the backend, as in patch 02/14 demonstrates.
Alexander