]> gcc.gnu.org Git - gcc.git/commitdiff
Update OpenACC tests for amdgcn
authorAndrew Stubbs <ams@codesourcery.com>
Fri, 13 Dec 2019 17:40:06 +0000 (17:40 +0000)
committerAndrew Stubbs <ams@gcc.gnu.org>
Fri, 13 Dec 2019 17:40:06 +0000 (17:40 +0000)
2019-12-13  Andrew Stubbs  <ams@codesourcery.com>

libgomp/
* testsuite/libgomp.oacc-c-c++-common/acc_prof-init-1.c: Handle gcn.
* testsuite/libgomp.oacc-c-c++-common/acc_prof-kernels-1.c: Likewise.
* testsuite/libgomp.oacc-c-c++-common/acc_prof-parallel-1.c: Likewise.
* testsuite/libgomp.oacc-c-c++-common/asyncwait-nop-1.c: Likewise.
* testsuite/libgomp.oacc-c-c++-common/function-not-offloaded.c:
Likewise.
* testsuite/libgomp.oacc-c-c++-common/async_queue-1.c: Disable on GCN.
* testsuite/libgomp.oacc-c-c++-common/tile-1.c: Likewise.

From-SVN: r279378

libgomp/ChangeLog
libgomp/testsuite/libgomp.oacc-c-c++-common/acc_prof-init-1.c
libgomp/testsuite/libgomp.oacc-c-c++-common/acc_prof-kernels-1.c
libgomp/testsuite/libgomp.oacc-c-c++-common/acc_prof-parallel-1.c
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/tile-1.c

index 136ba6cbdb3fcd08f54da92f5760f52b54beae5e..ce440394c95c8f6df69628cee2332c9e433d7895 100644 (file)
@@ -1,3 +1,14 @@
+2019-12-13  Andrew Stubbs  <ams@codesourcery.com>
+
+       * testsuite/libgomp.oacc-c-c++-common/acc_prof-init-1.c: Handle gcn.
+       * testsuite/libgomp.oacc-c-c++-common/acc_prof-kernels-1.c: Likewise.
+       * testsuite/libgomp.oacc-c-c++-common/acc_prof-parallel-1.c: Likewise.
+       * testsuite/libgomp.oacc-c-c++-common/asyncwait-nop-1.c: Likewise.
+       * testsuite/libgomp.oacc-c-c++-common/function-not-offloaded.c:
+       Likewise.
+       * testsuite/libgomp.oacc-c-c++-common/async_queue-1.c: Disable on GCN.
+       * testsuite/libgomp.oacc-c-c++-common/tile-1.c: Likewise.
+
 2019-12-13  Tobias Burnus  <tobias@codesourcery.com>
 
        * openacc.f90 (module openacc_kinds): Use 'PUBLIC' to mark all symbols
index b356feb8108ca7add09963ee373adb4f690f6456..e82a03e8f3cb1bc5b7f28e472196b8769c80adf6 100644 (file)
@@ -224,6 +224,8 @@ static void cb_compute_construct_end (acc_prof_info *prof_info, acc_event_info *
 
   if (acc_device_type == acc_device_host)
     assert (api_info->device_api == acc_device_api_none);
+  else if (acc_device_type == acc_device_gcn)
+    assert (api_info->device_api == acc_device_api_other);
   else
     assert (api_info->device_api == acc_device_api_cuda);
   assert (api_info->valid_bytes == _ACC_API_INFO_VALID_BYTES);
index 7cfc364e4113fd11a255ed349eda389a8e9026ce..ddf647cda9beecbc227583f3191a05d2ebc0c239 100644 (file)
@@ -106,6 +106,8 @@ static void cb_enqueue_launch_start (acc_prof_info *prof_info, acc_event_info *e
     assert (event_info->launch_event.vector_length >= 1);
   else if (acc_device_type == acc_device_nvidia) /* ... is special.  */
     assert (event_info->launch_event.vector_length == 32);
+  else if (acc_device_type == acc_device_gcn) /* ...and so is this.  */
+    assert (event_info->launch_event.vector_length == 64);
   else
     {
 #ifdef __OPTIMIZE__
@@ -118,6 +120,8 @@ static void cb_enqueue_launch_start (acc_prof_info *prof_info, acc_event_info *e
 
   if (acc_device_type == acc_device_host)
     assert (api_info->device_api == acc_device_api_none);
+  else if (acc_device_type == acc_device_gcn)
+    assert (api_info->device_api == acc_device_api_other);
   else
     assert (api_info->device_api == acc_device_api_cuda);
   assert (api_info->valid_bytes == _ACC_API_INFO_VALID_BYTES);
index ac6eb48cbbef860e996fd94c277099effa52f2a3..dc7c7582ce2dfc212d97100509e355c3f379b5b4 100644 (file)
@@ -265,6 +265,8 @@ static void cb_enter_data_end (acc_prof_info *prof_info, acc_event_info *event_i
 
   if (acc_device_type == acc_device_host)
     assert (api_info->device_api == acc_device_api_none);
+  else if (acc_device_type == acc_device_gcn)
+    assert (api_info->device_api == acc_device_api_other);
   else
     assert (api_info->device_api == acc_device_api_cuda);
   assert (api_info->valid_bytes == _ACC_API_INFO_VALID_BYTES);
@@ -319,6 +321,8 @@ static void cb_exit_data_start (acc_prof_info *prof_info, acc_event_info *event_
 
   if (acc_device_type == acc_device_host)
     assert (api_info->device_api == acc_device_api_none);
+  else if (acc_device_type == acc_device_gcn)
+    assert (api_info->device_api == acc_device_api_other);
   else
     assert (api_info->device_api == acc_device_api_cuda);
   assert (api_info->valid_bytes == _ACC_API_INFO_VALID_BYTES);
@@ -371,6 +375,8 @@ static void cb_exit_data_end (acc_prof_info *prof_info, acc_event_info *event_in
 
   if (acc_device_type == acc_device_host)
     assert (api_info->device_api == acc_device_api_none);
+  else if (acc_device_type == acc_device_gcn)
+    assert (api_info->device_api == acc_device_api_other);
   else
     assert (api_info->device_api == acc_device_api_cuda);
   assert (api_info->valid_bytes == _ACC_API_INFO_VALID_BYTES);
@@ -510,6 +516,8 @@ static void cb_compute_construct_end (acc_prof_info *prof_info, acc_event_info *
 
   if (acc_device_type == acc_device_host)
     assert (api_info->device_api == acc_device_api_none);
+  else if (acc_device_type == acc_device_gcn)
+    assert (api_info->device_api == acc_device_api_other);
   else
     assert (api_info->device_api == acc_device_api_cuda);
   assert (api_info->valid_bytes == _ACC_API_INFO_VALID_BYTES);
@@ -573,6 +581,8 @@ static void cb_enqueue_launch_start (acc_prof_info *prof_info, acc_event_info *e
 
   if (acc_device_type == acc_device_host)
     assert (api_info->device_api == acc_device_api_none);
+  else if (acc_device_type == acc_device_gcn)
+    assert (api_info->device_api == acc_device_api_other);
   else
     assert (api_info->device_api == acc_device_api_cuda);
   assert (api_info->valid_bytes == _ACC_API_INFO_VALID_BYTES);
@@ -637,6 +647,8 @@ static void cb_enqueue_launch_end (acc_prof_info *prof_info, acc_event_info *eve
 
   if (acc_device_type == acc_device_host)
     assert (api_info->device_api == acc_device_api_none);
+  else if (acc_device_type == acc_device_gcn)
+    assert (api_info->device_api == acc_device_api_other);
   else
     assert (api_info->device_api == acc_device_api_cuda);
   assert (api_info->valid_bytes == _ACC_API_INFO_VALID_BYTES);
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 5130591dd818d8edbcc934211c9b629713a8865b..c019fe55c7a2250d93d0662609e21416514fd123 100644 (file)
@@ -1,3 +1,6 @@
+/* AMD GCN does not use 32-lane vectors, so the expected use counts mismatch.
+   { dg-skip-if "unsuitable dimensions" { openacc_amdgcn_accel_selected } { "*" } { "" } } */
+
 /* { dg-additional-options "-fopenacc-dim=32" } */
 
 #include <stdio.h>
This page took 0.082735 seconds and 5 git commands to generate.