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: Jakub Jelinek <jakub at redhat dot com>
- To: Ilya Verbin <iverbin at gmail 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: Wed, 15 Oct 2014 17:35:18 +0200
- 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>
- Reply-to: Jakub Jelinek <jakub at redhat dot com>
On Wed, Oct 15, 2014 at 07:28:37PM +0400, Ilya Verbin wrote:
> On 15 Oct 17:05, Jakub Jelinek wrote:
> > > This patch adds all examples with '#pragma omp target' from [1] to libgomp
> > > testsuite. Without an accelerator or emulator, these tests are UNSUPPORTED.
> >
> > Why? Most of the tests should work just fine with host fallback.
> > Yeah, from Examples 4.0.1 I'm aware of some tests which assume that host
> > fallback doesn't happen, but they should be in minority.
> > So, can you temporarily change check_effective_target_offload_device to
> > always return 0 from main, run the testsuite with OMP_DEFAULT_DEVICE=10000
> > in the environment and see what testcases really need
> > { dg-require-effective-target offload_device } ?
>
> Yes, they will work fine with host fallback, however we want to be sure that
> tests are running on device (or emulator). If there were some issue with
> offloading, and a test actually were running in fallback mode, we would never
> know about it. That's why we added dg-require-effective-target to all tests.
But we do want to test them with host fallback, which those lines preclude.
Just a single dg-require-effective-target offload_device guarded test (which
there necessarily is, e.g. the 57.* ones) should be sufficient for your
purposes (if you want to diff UNSUPPORTED vs. PASS tests between runs).
Right now the result of that test turns all tests in the directory into
UNSUPPORTED, with the removals you'd just turn a single one or a dozen or
how many would really need it.
The fact that the tcl offload_device check succeeded doesn't mean that all
tests don't use host fallback anyway.
Additionally to a handful of dg-require-effective-target offload_device
you could have one which just prints something on stdout depending on if
it is offloaded or not, you can grep for the output of that in your
libgomp.log.
Jakub