This is the mail archive of the mailing list for the GCC project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH 7/n] OpenMP 4.0 offloading infrastructure: testsuite

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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]