This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: OpenACC support in 4.9
- From: Jakub Jelinek <jakub at redhat dot com>
- To: Richard Biener <richard dot guenther at gmail dot com>
- Cc: Torvald Riegel <triegel at redhat dot com>, Tobias Burnus <burnus at net-b dot de>, Jeff Law <law at redhat dot com>, Evgeny Gavrin <e dot gavrin at samsung dot com>, gcc at gcc dot gnu dot org, GarbuzovViacheslav <v dot garbuzov at samsung dot com>, dtemirbulatov at gmail dot com
- Date: Fri, 10 May 2013 11:15:11 +0200
- Subject: Re: OpenACC support in 4.9
- References: <51879F4E dot 10402 at samsung dot com> <5187B30F dot 1050709 at net-b dot de> <5187C958 dot 9020606 at redhat dot com> <CAFiYyc3bnnFL=k8w-ZqJnL3UtQrFjdNmrdNmiA7mCiuGVtK_aQ at mail dot gmail dot com> <5188C310 dot 5050305 at net-b dot de> <CAFiYyc24FM9Z9meh2DF94bv3VV0gaUgP-nc3CWAZXotBb4ZA0w at mail dot gmail dot com> <CAFiYyc0mattq5enLL+DQxwviob=5qpOjOA5JQWZoE9CDFJQVzg at mail dot gmail dot com> <1368044713 dot 7774 dot 1408 dot camel at triegel dot csb> <CAFiYyc20fgf2hfaqDQzEbwAea0-+=LJL4PQX7X9ndWOwVWor7Q at mail dot gmail dot com>
- Reply-to: Jakub Jelinek <jakub at redhat dot com>
On Fri, May 10, 2013 at 11:00:29AM +0200, Richard Biener wrote:
> >> Which
> >> means changing the GOMP runtime in a way to be able to pass a descriptor
> >> which eventually has accelerator code (and a fallback regular function so
> >> you can disable accelerator usage at runtime).
> >
> > It probably should be a list of different codes -- you might have more
> > than one suitable accelerator available.
>
> Of course. And the descriptor should be versioned to avoid future ABI
> changes. Note that I'd always generate code for the CPU as fallback.
If one uses the OpenMP 4.0 accelerator pragmas, then that is the required
behavior, if the code is for whatever reason not possible to run on the
accelerator, it should be executed on host (and the vars can be shared in
that case between the standard host code and the for accelerator targetted,
but actually on host executed, code). Otherwise, the OpenMP runtime as well
as the pragmas have a way to choose which accelerator you want to run
something on, as device id (integer), so the OpenMP runtime library should
maintain the list of supported accelerators (say if you have two Intel MIC
cards, and two AMD GPGPU devices), and probably we'll need a compiler switch
to say for which kinds of accelerators we want to generate code for, plus
the runtime could have dlopened plugins for each of the accelerator kinds.
> > BTW: What about putting this topic on the Cauldron agenda? Is there
> > still time available to discuss what GCC might do regarding accelerators
> > and HW heterogeneity?
Yeah, it would be nice to discuss that. By that time I hope we'll be at
least through parsing of the accelerator stuff, so we can then design what
to do with that info.
Jakub