]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
[og9] A couple of GCN-specific test fixes
authorJulian Brown <julian@codesourcery.com>
Wed, 11 Sep 2019 15:31:38 +0000 (08:31 -0700)
committerThomas Schwinge <thomas@codesourcery.com>
Tue, 3 Mar 2020 11:51:25 +0000 (12:51 +0100)
libgomp/
* testsuite/libgomp.oacc-c-c++-common/async_queue-1.c: Only run
NVidia-specific test on NVidia hardware.
* testsuite/libgomp.oacc-c-c++-common/asyncwait-nop-1.c (main):
Initialise for acc_device_gcn if testing on AMD GCN.
* testsuite/libgomp.oacc-c-c++-common/function-not-offloaded.c: Support
AMD GCN.
* testsuite/libgomp.oacc-c-c++-common/loop-dim-default.c (check): Skip
vector dimension test for AMD GCN.

(cherry picked from openacc-gcc-9-branch commit
0467f885d40e76d2d34dac372e4b3dd9b84c31f1)

libgomp/ChangeLog.omp
libgomp/testsuite/libgomp.oacc-c-c++-common/async_queue-1.c
libgomp/testsuite/libgomp.oacc-c-c++-common/asyncwait-nop-1.c
libgomp/testsuite/libgomp.oacc-c-c++-common/function-not-offloaded.c
libgomp/testsuite/libgomp.oacc-c-c++-common/loop-dim-default.c

index 14ed4e0ec2c98861f7c3492336b505b33759ce6f..1a624af1ff989e5b6ac4a2be47d26d698c7b3a7e 100644 (file)
@@ -1,3 +1,14 @@
+2019-09-17  Julian Brown  <julian@codesourcery.com>
+
+       * testsuite/libgomp.oacc-c-c++-common/async_queue-1.c: Only run
+       NVidia-specific test on NVidia hardware.
+       * testsuite/libgomp.oacc-c-c++-common/asyncwait-nop-1.c (main):
+       Initialise for acc_device_gcn if testing on AMD GCN.
+       * testsuite/libgomp.oacc-c-c++-common/function-not-offloaded.c: Support
+       AMD GCN.
+       * testsuite/libgomp.oacc-c-c++-common/loop-dim-default.c (check): Skip
+       vector dimension test for AMD GCN.
+
 2019-09-13  Tobias Burnus  <tobias@codesourcery.com>
 
        * plugin/plugin-gcn.c (hsa_warn, hsa_fatal, hsa_error): Ensure
index 544b19fe6635db4ed7ebdceff2db5c2df9b26f90..4f9e53da85d0b89ec5ef309bb622d3ac1472ffb4 100644 (file)
@@ -1,3 +1,5 @@
+/* { dg-do run { target openacc_nvidia_accel_selected } } */
+
 /* Test mapping of async values to specific underlying queues.  */
 
 #undef NDEBUG
index 4ab67363ba67e003dd798a2a77f66debfdc85ab2..840052fec12252668bbd4bcdc5e1ab3cdad03d3c 100644 (file)
@@ -26,6 +26,8 @@ main ()
   acc_device_t d;
 #if defined ACC_DEVICE_TYPE_nvidia
   d = acc_device_nvidia;
+#elif defined ACC_DEVICE_TYPE_gcn
+  d = acc_device_gcn;
 #elif defined ACC_DEVICE_TYPE_host
   d = acc_device_host;
 #else
index fdf4eb08f8a0f44292f3620732c22e76dfca677d..517004a562d2a96cf2f84db7c8487d0afc7cc107 100644 (file)
@@ -1,11 +1,11 @@
 /* { dg-do link } */
-/* { dg-excess-errors "lto1, mkoffload and lto-wrapper fatal errors" { target openacc_nvidia_accel_selected } } */
+/* { dg-excess-errors "lto1, mkoffload and lto-wrapper fatal errors" { target { openacc_nvidia_accel_selected || openacc_amdgcn_accel_selected } } } */
 
 int var;
 #pragma acc declare create (var)
 
 void __attribute__((noinline, noclone))
-foo () /* { dg-error "function 'foo' has been referenced in offloaded code but hasn't been marked to be included in the offloaded code" "" { target openacc_nvidia_accel_selected } } */
+foo () /* { dg-error "function 'foo' has been referenced in offloaded code but hasn't been marked to be included in the offloaded code" "" { target { openacc_nvidia_accel_selected || openacc_amdgcn_accel_selected } } } */
 {
   var++;
 }
index dd8107c1accf5134144a480c6ad80515c88f842e..5cd0e3122be55e16ee9f5a61fe9d2560f5ded596 100644 (file)
@@ -80,13 +80,18 @@ int check (const int *ary, int size, int gp, int wp, int vp)
        exit = 1;
       }
   
+#ifndef ACC_DEVICE_TYPE_gcn
+  /* AMD GCN uses the autovectorizer for the vector dimension: the use
+     of a function call in vector-partitioned code in this test is not
+     currently supported.  */
   for (ix = 0; ix < vp; ix++)
     if (vectors[ix] != vectors[0])
       {
-       printf ("vector %d not used %d times\n", ix, vectors[0]);
-       exit = 1;
+       printf ("vector %d not used %d times\n", ix, vectors[0]); exit
+       = 1;
       }
-  
+#endif
+
   return exit;
 }