diff mbox series

AArch64: Don't check for amdgcn-amdhsa at all on arm targets.

Message ID 20200610165652.GA29047@arm.com
State New
Headers show
Series AArch64: Don't check for amdgcn-amdhsa at all on arm targets. | expand

Commit Message

Tamar Christina June 10, 2020, 4:56 p.m. UTC
Hi All,

The amdgcn-amdhsa test seems to be running for all targets unconditionally while
only really makes sense for certain targets.  This patch adds an opt-out list
and opts out arm targets.

Regtested on aarch64-none-linux-gnu and no issues.

Ok for master?

Thanks,
Tamar

gcc/testsuite/ChangeLog:

	* lib/target-supports.exp (check_effective_target_offload_gcn): Skip for
	arm targets.

--

Comments

Andrew Pinski June 10, 2020, 5:10 p.m. UTC | #1
On Wed, Jun 10, 2020 at 9:57 AM Tamar Christina <tamar.christina@arm.com> wrote:
>
> Hi All,
>
> The amdgcn-amdhsa test seems to be running for all targets unconditionally while
> only really makes sense for certain targets.  This patch adds an opt-out list
> and opts out arm targets.
>
> Regtested on aarch64-none-linux-gnu and no issues.
>
> Ok for master?

I don't think this is right.  It does make sense to have aarch64 to
support it as an offload; though someone needs to test out the GPU
card on an ARM64 server.
Maybe checking for *-*-elf *-*-eabi and returning false for those
targets should be enough for most embedded targets.

Thanks,
Andrew Pinski

>
> Thanks,
> Tamar
>
> gcc/testsuite/ChangeLog:
>
>         * lib/target-supports.exp (check_effective_target_offload_gcn): Skip for
>         arm targets.
>
> --
Tamar Christina June 15, 2020, 7:48 a.m. UTC | #2
Hi Andrew,

> >
> > The amdgcn-amdhsa test seems to be running for all targets
> > unconditionally while only really makes sense for certain targets.
> > This patch adds an opt-out list and opts out arm targets.
> >
> > Regtested on aarch64-none-linux-gnu and no issues.
> >
> > Ok for master?
> 
> I don't think this is right.  It does make sense to have aarch64 to support it as
> an offload; though someone needs to test out the GPU card on an ARM64
> server.

That seems contradictory to me. Someone should first test it then enable it.

> Maybe checking for *-*-elf *-*-eabi and returning false for those targets
> should be enough for most embedded targets.
> 

Ultimately this won't help me. My problem with the test isn't that it's running,
It's that it's very very loud. 

There doesn't seem to be any way to silence the result of the feature check as
is done with virtually every other feature check *but* this one.

Instead you get

xgcc: fatal error: GCC is not configured to support amdgcn-amdhsa as offload target^M
compilation terminated.^M
compiler exited with status 1

which gets confused with people thinking something is broken.  If this feature test can
somehow behave like the rest (e.g. don't spit out anything unless -v is passed to dejagnu)
then I would be happy.

Thanks,
Tamar

> Thanks,
> Andrew Pinski
> 
> >
> > Thanks,
> > Tamar
> >
> > gcc/testsuite/ChangeLog:
> >
> >         * lib/target-supports.exp (check_effective_target_offload_gcn): Skip
> for
> >         arm targets.
> >
> > --
diff mbox series

Patch

diff --git a/gcc/testsuite/lib/target-supports.exp b/gcc/testsuite/lib/target-supports.exp
index b335108358d0c878193ce07771b69933f3ec4d26..b4da4ddf86063288abd353569c4dc7c75ce326f0 100644
--- a/gcc/testsuite/lib/target-supports.exp
+++ b/gcc/testsuite/lib/target-supports.exp
@@ -9787,6 +9787,10 @@  proc check_effective_target_offload_hsa { } {
 # Return 1 if the compiler has been configured with hsa offloading.
 
 proc check_effective_target_offload_gcn { } {
+    if { [istarget aarch64*-*-*] || [istarget arm*-*-*] } {
+	return 0
+    }
+
     return [check_no_compiler_messages offload_gcn assembly {
 	int main () {return 0;}
     } "-foffload=amdgcn-amdhsa" ]