This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH 7/n] OpenMP 4.0 offloading infrastructure: testsuite
- From: Ilya Verbin <iverbin at gmail dot com>
- To: Jakub Jelinek <jakub at redhat dot com>
- Cc: gcc-patches at gcc dot gnu dot org, Bernd Schmidt <bernds at codesourcery dot com>, Thomas Schwinge <thomas at codesourcery dot com>, Kirill Yukhin <kirill dot yukhin at gmail dot com>, Andrey Turetskiy <andrey dot turetskiy at gmail dot com>
- Date: Fri, 17 Oct 2014 19:17:31 +0400
- Subject: Re: [PATCH 7/n] OpenMP 4.0 offloading infrastructure: testsuite
- Authentication-results: sourceware.org; auth=none
- References: <20141015145752 dot GB46277 at msticlxl57 dot ims dot intel dot com> <20141015150543 dot GR10376 at tucnak dot redhat dot com> <20141015152837 dot GC46277 at msticlxl57 dot ims dot intel dot com> <20141015153518 dot GS10376 at tucnak dot redhat dot com> <20141017140211 dot GA28310 at msticlxl57 dot ims dot intel dot com> <20141017141455 dot GY10376 at tucnak dot redhat dot com> <20141017145817 dot GB28310 at msticlxl57 dot ims dot intel dot com> <20141017151054 dot GC10376 at tucnak dot redhat dot com>
On 17 Oct 17:10, Jakub Jelinek wrote:
> On Fri, Oct 17, 2014 at 06:58:17PM +0400, Ilya Verbin wrote:
> > Here in the original test you have:
> >
> > #pragma omp target if (v <= 1)
> > if (omp_get_level () != 0 || (f && !omp_is_initial_device ()))
> > abort ();
> > #pragma omp target device (d) if (v <= 1)
> > if (omp_get_level () != 0 || (f && !omp_is_initial_device ()))
> > abort ();
> >
> > There are 2 same if-statements, but target pragmas have different clauses.
> > The second depends on device (d), and (f && !omp_is_initial_device ()) works
> > fine. But the first one doesn't depend on 'f', and if we have offload device,
> > this check will fail.
> >
> > So, to have this test working both with offloading and fallback, we need to
> > remove all pragmas without device-clause.
>
> Well, there is no need to remove them, just the " || (f && !omp_is_initial_device ())"
> should be dropped from target regions without device (d) on them.
> Where there is no f && guard, the condition should stay.
> Do you agree?
Yes, should I re-post the patch?
-- Ilya