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
Yeah. > 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. Jakub