On Tue, Oct 20, 2015 at 09:34:35PM +0300, Alexander Monakov wrote: > On NVPTX, we don't need most of target.c functionality, except for GOMP_teams. > Provide it as a copy of the generic implementation for now (it most likely > will need to change down the line: on NVPTX we do need to spawn several > thread blocks for #pragma omp teams). > > Alternatively, it might make sense to split GOMP_teams out of target.c into > its own file (teams.c?), leaving target.c a 0-size stub in config/nvptx. > > * config/nvptx/target.c: New.
This is fine. I bet it will need changes on the compiler side too, GOMP_teams has been written with rough idea of the dynamic parallelism, we'll need to do something with private (per-CTA) vars, shared (global) vars etc., dunno if with tweaks just in the late omp lowering pass after it is lowered/expanded as OpenMP already, or if we'll need Martin's HSA approach. Jakub