This is the mail archive of the
mailing list for the GCC project.
Re: The nvptx port [1/11+] indirect jumps
- From: Jakub Jelinek <jakub at redhat dot com>
- To: Richard Biener <richard dot guenther at gmail dot com>
- Cc: Thomas Schwinge <thomas at codesourcery dot com>, Bernd Schmidt <bernds at codesourcery dot com>, Jeff Law <law at redhat dot com>, GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Wed, 22 Oct 2014 12:19:21 +0200
- Subject: Re: The nvptx port [1/11+] indirect jumps
- Authentication-results: sourceware.org; auth=none
- References: <54451994 dot 9070209 at codesourcery dot com> <544519D8 dot 70606 at codesourcery dot com> <5446A55A dot 6060807 at redhat dot com> <5446C973 dot 3040102 at codesourcery dot com> <20141021213025 dot GE10376 at tucnak dot redhat dot com> <5446D0D4 dot 9000706 at codesourcery dot com> <CAFiYyc0eE1RvYfANE-z+CDcznxtHOs1X-1TzbWZHGVQKSYPSBg at mail dot gmail dot com> <87d29kjyem dot fsf at kepler dot schwinge dot homeip dot net> <CAFiYyc3_J6edo_JJPi71UYhOLLBT7oRNawvQuXT0vV570P=dRw at mail dot gmail dot com>
- Reply-to: Jakub Jelinek <jakub at redhat dot com>
On Wed, Oct 22, 2014 at 12:02:16PM +0200, Richard Biener wrote:
> > I'm not sure that's what you're suggesting, but at least on non-shared
> > memory offloading devices, you can't switch arbitrarily between
> > offloading device(s) and host-fallback, for you have to do data
> > management between the non-shared memories.
> Oh, I see. For HSA we simply don't emit an offload variant for code
> we cannot handle. But only for those parts.
> So it's only offload or fallback for other devices? Thus also never
> share work between both for example (run N threads on the CPU
> and M threads on the offload target)?
I believe at least for the non-shared memory the OpenMP model wouldn't allow
that. Of course, user can do the sharing explicitly (though OpenMP 4.0
doesn't have asynchronous target regions): one could e.g. run a couple of
host tasks on the offloading region with if (0) - forced host fallback,
ensure e.g. one team and one parallel thread in that case,
and then in one host task with if (1) and use as many teams and parallel
threads as available on the offloading device.