This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [omp, hsa] Do not gridify simd constructs
- From: Jakub Jelinek <jakub at redhat dot com>
- To: GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Fri, 26 Feb 2016 17:05:13 +0100
- Subject: Re: [omp, hsa] Do not gridify simd constructs
- Authentication-results: sourceware.org; auth=none
- References: <20160226155719 dot GB3094 at virgil dot suse dot cz>
- Reply-to: Jakub Jelinek <jakub at redhat dot com>
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 <mjambor@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