[PATCH] xfail and improve some failing libgomp tests

Jakub Jelinek jakub@redhat.com
Tue Oct 6 15:02:29 GMT 2020


On Tue, Oct 06, 2020 at 04:48:40PM +0200, Tom de Vries wrote:
> On 10/5/20 3:15 PM, Tom de Vries wrote:
> > On 2/7/20 4:29 PM, Jakub Jelinek wrote:
> >> On Fri, Feb 07, 2020 at 09:56:38AM +0100, Harwath, Frederik wrote:
> >>> * {target-32.c, thread-limit-2.c}:
> >>> no "usleep" implemented for nvptx. Cf. https://gcc.gnu.org/PR81690
> >>
> >> Please don't, I want to deal with that using declare variant, just didn't
> >> get yet around to finishing the last patch needed for that.  Will try next week.
> >>
> > 
> > Hi Jakub,
> > 
> > Ping, any update on this?

Not finished the last step, I run into LTO issues.  Will need to return to
that soon.
Last progress in "[RFH] LTO cgraph support for late declare variant resolution"
mail from May on gcc-patches.

> --- a/libgomp/testsuite/libgomp.c/target-32.c
> +++ b/libgomp/testsuite/libgomp.c/target-32.c
> @@ -1,6 +1,26 @@
>  #include <stdlib.h>
>  #include <unistd.h>
>  
> +extern void base_delay(int);

No need to declare this one early.

> +extern void nvptx_delay(int);

Space before (, and the definition could go here instead of
the declaration.

> +#pragma omp declare variant( nvptx_delay ) match( construct={target}, implementation={vendor(nvidia)} )

This isn't the right declare variant for what we want though,
we only provide gnu as accepted vendor, it is implementation's vendor,
not vendor of one of the hw components.
So, it ought to be instead
#pragma omp declare variant (nvptx_delay) match(construct={target},device={arch(nvptx)})

> +void base_delay(int d)
> +{
> +  usleep (d);
> +}

	Jakub



More information about the Gcc-patches mailing list