On Fri, Feb 26, 2016 at 04:57:19PM +0100, Martin Jambor wrote: > unfortunately, I have missed two execution failures when using HSA > (teams-6.f90 and target1.f90), both of which are caused by not > handling the simd part of combined target teams distribute parallel > for simd construct. I have not really thought through how exactly > should GPUs teat the simd construct in a combined construct but of > course we must not miscompile. > > So I'd like to commit the following patch which just disallows > gridification of such cases to trunk now and am working on a fix that > removes the simd loop for the hsa branch. Eventually we might also > want to hsa-vectorize the body even though the explicit loop is > missing, but that will also mean that the HSA grid size has to shrink > appropriately. > > Bootstrapped and tested on x86_64-linux, with and without HSA > enabled. OK for trunk? > > Thanks, > > Martin > > 2016-02-17 Martin Jambor <mjam...@suse.cz> > > * omp-low.c (grid_find_ungridifiable_statement): Store problematic > statements to wi->info. Also disallow omp simd constructs. > (grid_target_follows_gridifiable_pattern): Use wi.info to dump reason > for not gridifying. Dump special string for omp_for.
Ok (though hope that for GCC 7 you actually handle it better). Jakub