]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
[og9] Fix configury for AMD GCN testing
authorJulian Brown <julian@codesourcery.com>
Wed, 7 Aug 2019 13:40:29 +0000 (06:40 -0700)
committerThomas Schwinge <thomas@codesourcery.com>
Tue, 3 Mar 2020 11:50:41 +0000 (12:50 +0100)
libgomp/
* plugin/configfrag.ac (amdgcn): Set tgt_plugin.
* testsuite/lib/libgomp.exp (offload_target_to_openacc_device_type):
Add AMD GCN support.
(check_effective_target_openacc_amdgcn_accel_selected): Test
offload_target instead of offload_target_openacc.
* testsuite/libgomp.oacc-c++/c++.exp (amdgcn*): Rename stanza to...
(gcn): ...this. Don't set tagopt redundantly here.
* testsuite/libgomp.oacc-c/c.exp (amdgcn*, gcn): Likewise.
* testsuite/libgomp.oacc-fortran/fortran.exp (amdgcn*, gcn): Likewise.
* configure: Regenerated.

(cherry picked from openacc-gcc-9-branch commit
a48bf635e1b7ef94a057ed10d433070ccf5724de)

libgomp/ChangeLog.omp
libgomp/configure
libgomp/plugin/configfrag.ac
libgomp/testsuite/lib/libgomp.exp
libgomp/testsuite/libgomp.oacc-c++/c++.exp
libgomp/testsuite/libgomp.oacc-c/c.exp
libgomp/testsuite/libgomp.oacc-fortran/fortran.exp

index 80d089f49e2a00d16c8d8256fb5eb9634ac216bc..62c56e3bf92d10ec4bbb748fe8badb2c163ad297 100644 (file)
@@ -1,3 +1,16 @@
+2019-08-08  Julian Brown  <julian@codesourcery.com>
+
+       * plugin/configfrag.ac (amdgcn): Set tgt_plugin.
+       * testsuite/lib/libgomp.exp (offload_target_to_openacc_device_type):
+       Add AMD GCN support.
+       (check_effective_target_openacc_amdgcn_accel_selected): Test
+       offload_target instead of offload_target_openacc.
+       * testsuite/libgomp.oacc-c++/c++.exp (amdgcn*): Rename stanza to...
+       (gcn): ...this. Don't set tagopt redundantly here.
+       * testsuite/libgomp.oacc-c/c.exp (amdgcn*, gcn): Likewise.
+       * testsuite/libgomp.oacc-fortran/fortran.exp (amdgcn*, gcn): Likewise.
+       * configure: Regenerated.
+
 2019-08-08  Julian Brown  <julian@codesourcery.com>
 
        * plugin/plugin-gcn.c (GOMP_OFFLOAD_openacc_exec_params,
index 39da8af45461f06711076ea4e3f9b01bb557967e..85a29c5b5e1ca9ddc69c25435676c2edf9bfc695 100755 (executable)
@@ -15781,6 +15781,7 @@ rm -f core conftest.err conftest.$ac_objext \
                ;;
              *)
                tgt_name=gcn
+               tgt_plugin=gcn
                PLUGIN_GCN=$tgt
                PLUGIN_GCN_CPPFLAGS=$HSA_RUNTIME_CPPFLAGS
                PLUGIN_GCN_LDFLAGS="$HSA_RUNTIME_LDFLAGS"
index 6fedd28eccc8e31916d041fa2c2936061697bcad..1ea67c913ba259b81abb96aa2b0b44246727635e 100644 (file)
@@ -256,6 +256,7 @@ if test x"$enable_offload_targets" != x; then
                ;;
              *)
                tgt_name=gcn
+               tgt_plugin=gcn
                PLUGIN_GCN=$tgt
                PLUGIN_GCN_CPPFLAGS=$HSA_RUNTIME_CPPFLAGS
                PLUGIN_GCN_LDFLAGS="$HSA_RUNTIME_LDFLAGS"
index 19bee806fb0813378fbaa2a6178060ba12a83486..9644176da2ac0ba56216eefce7f8130bb567da7d 100644 (file)
@@ -316,6 +316,9 @@ proc offload_target_to_openacc_device_type { offload_target } {
        nvptx* {
            return "nvidia"
        }
+       amdgcn* {
+           return "gcn"
+       }
        default {
            error "Unknown offload target: $offload_target"
        }
@@ -463,8 +466,8 @@ proc check_effective_target_openacc_amdgcn_accel_selected { } {
     if { ![check_effective_target_openacc_amdgcn_accel_present] } {
        return 0;
     }
-    global offload_target_openacc
-    if { [string match "amdgcn*" $offload_target_openacc] } {
+    global offload_target
+    if { [string match "amdgcn*" $offload_target] } {
         return 1;
     }
     return 0;
index 1285a6a1c6d6250df81b8ccfeff97e4e34d1a9f2..86aacff0c37bb7a39c6b134ce5df9bc938e14c10 100644 (file)
@@ -111,9 +111,8 @@ if { $lang_test_file_found } {
 
                set acc_mem_shared 0
            }
-           amdgcn* {
+           gcn {
                set acc_mem_shared 0
-               set tagopt "-DACC_DEVICE_TYPE_gcn=\"$offload_target_openacc\""
            }
            default {
                error "Unknown OpenACC device type: $openacc_device_type (offload target: $offload_target)"
index f7005ebba48f9a6ddc2a31a07fcc22f417d6a582..9ab68bbef149beb6978dc84a8832143af480a496 100644 (file)
@@ -72,9 +72,8 @@ foreach offload_target [concat [split $offload_targets ":"] "disable"] {
 
            set acc_mem_shared 0
        }
-       amdgcn* {
+       gcn {
            set acc_mem_shared 0
-           set tagopt "-DACC_DEVICE_TYPE_gcn=\"$offload_target_openacc\""
        }
        default {
            error "Unknown OpenACC device type: $openacc_device_type (offload target: $offload_target)"
index 0f8d1db489516efd7cd893f20c3e4295581e994d..e36fb15c1ca2751e2dd7e03ad40188192fa6790e 100644 (file)
@@ -90,9 +90,8 @@ if { $lang_test_file_found } {
 
                set acc_mem_shared 0
            }
-           amdgcn* {
+           gcn {
                set acc_mem_shared 0
-               set tagopt "-DACC_DEVICE_TYPE_gcn=\"$offload_target_openacc\""
            }
            default {
                error "Unknown OpenACC device type: $openacc_device_type (offload target: $offload_target)"