]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
[og9] Use a single worker for OpenACC on AMD GCN
authorJulian Brown <julian@codesourcery.com>
Mon, 5 Aug 2019 22:05:58 +0000 (15:05 -0700)
committerThomas Schwinge <thomas@codesourcery.com>
Tue, 3 Mar 2020 11:50:41 +0000 (12:50 +0100)
gcc/
* config/gcn/gcn.c (gcn_goacc_validate_dims): Ensure
flag_worker_partitioning is not set.
(TARGET_GOACC_WORKER_PARTITIONING): Remove target hook definition.
* config/gcn/gcn.opt (macc-experimental-workers): Default to off.

libgomp/
* plugin/plugin-gcn.c (gcn_exec): Use 1 for the default number of
workers.

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

gcc/ChangeLog.omp
gcc/config/gcn/gcn.c
gcc/config/gcn/gcn.opt
libgomp/ChangeLog.omp
libgomp/plugin/plugin-gcn.c

index 0caa1cd1401315f506feaef1b88f4f14dbe5dee5..84d8051160307ce5e8a9123c2099b0c76218c125 100644 (file)
@@ -1,3 +1,10 @@
+2019-08-08  Julian Brown  <julian@codesourcery.com>
+
+       * config/gcn/gcn.c (gcn_goacc_validate_dims): Ensure
+       flag_worker_partitioning is not set.
+       (TARGET_GOACC_WORKER_PARTITIONING): Remove target hook definition.
+       * config/gcn/gcn.opt (macc-experimental-workers): Default to off.
+
 2019-07-31  Julian Brown  <julian@codesourcery.com>
 
        * builtin-types.def (BT_FN_VOID_INT_INT_OMPFN_SIZE_PTR_PTR_PTR_VAR):
index 9f73fc8161adeeda412d8fda8b58c9a3b1f7b5bf..f3f112d95a9d8956b00f457dc36de84269c368ee 100644 (file)
@@ -4662,6 +4662,8 @@ gcn_goacc_validate_dims (tree decl, int dims[], int fn_level,
   /* FIXME: remove -facc-experimental-workers when they're ready.  */
   int max_workers = flag_worker_partitioning ? 16 : 1;
 
+  gcc_assert (!flag_worker_partitioning);
+
   /* The vector size must appear to be 64, to the user, unless this is a
      SEQ routine.  The real, internal value is always 1, which means use
      autovectorization, but the user should not see that.  */
@@ -6038,8 +6040,6 @@ print_operand (FILE *file, rtx x, int code)
 #define TARGET_GOACC_REDUCTION gcn_goacc_reduction
 #undef  TARGET_GOACC_VALIDATE_DIMS
 #define TARGET_GOACC_VALIDATE_DIMS gcn_goacc_validate_dims
-#undef  TARGET_GOACC_WORKER_PARTITIONING
-#define TARGET_GOACC_WORKER_PARTITIONING true
 #undef  TARGET_HARD_REGNO_MODE_OK
 #define TARGET_HARD_REGNO_MODE_OK gcn_hard_regno_mode_ok
 #undef  TARGET_HARD_REGNO_NREGS
index 2fd3996edbad89372979e178fc310279241b1a9e..90d35f42e570b8e7a4cd212d6fceec8fc7f0a002 100644 (file)
@@ -62,7 +62,7 @@ Target Report RejectNegative Var(flag_bypass_init_error)
 bool flag_worker_partitioning = false
 
 macc-experimental-workers
-Target Report Var(flag_worker_partitioning) Init(1)
+Target Report Var(flag_worker_partitioning) Init(0)
 
 int stack_size_opt = -1
 
index 62c56e3bf92d10ec4bbb748fe8badb2c163ad297..2279545f361809270b1793323468c145b1bf21b3 100644 (file)
@@ -1,3 +1,8 @@
+2019-08-08  Julian Brown  <julian@codesourcery.com>
+
+       * plugin/plugin-gcn.c (gcn_exec): Use 1 for the default number of
+       workers.
+
 2019-08-08  Julian Brown  <julian@codesourcery.com>
 
        * plugin/configfrag.ac (amdgcn): Set tgt_plugin.
index 6eaae66c1a91dcc6b824184513d994e4602db4bd..a41568b33067721eb6e78d2331b80baff4aead11 100644 (file)
@@ -3233,8 +3233,10 @@ gcn_exec (struct kernel_info *kernel, size_t mapnum, void **hostaddrs,
      problem size, so let's do a reasonable number of single-worker gangs.
      64 gangs matches a typical Fiji device.  */
 
+  /* NOTE: Until support for middle-end worker partitioning is merged, use 1
+     for the default number of workers.  */
   if (dims[0] == 0) dims[0] = 64; /* Gangs.  */
-  if (dims[1] == 0) dims[1] = 16; /* Workers.  */
+  if (dims[1] == 0) dims[1] = 1 /* Workers.  */
 
   /* The incoming dimensions are expressed in terms of gangs, workers, and
      vectors.  The HSA dimensions are expressed in terms of "work-items",