[6/7,amdgcn] Use a single worker for OpenACC on AMD GCN
diff mbox series

Message ID 4a85b8bd8b8acbd62c50120b72abbc5458e0715e.1573560401.git.ams@codesourcery.com
State New
Headers show
Series
  • AMD GCN Offloading Support
Related show

Commit Message

Andrew Stubbs Nov. 12, 2019, 1:29 p.m. UTC
This patch prevents the compiler using multiple workers in a gang.  This
should be reverted when worker support is committed.

I will commit this with the reset of the series.

Andrew


2019-11-12  Andrew Stubbs  <ams@codesourcery.com>
	    Julian Brown  <julian@codesourcery.com>

	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.
---
 gcc/config/gcn/gcn.c   | 4 ++--
 gcc/config/gcn/gcn.opt | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

Patch
diff mbox series

diff --git a/gcc/config/gcn/gcn.c b/gcc/config/gcn/gcn.c
index cdd24277cf6..1a69737f693 100644
--- a/gcc/config/gcn/gcn.c
+++ b/gcc/config/gcn/gcn.c
@@ -4695,6 +4695,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.  */
@@ -6073,8 +6075,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
diff --git a/gcc/config/gcn/gcn.opt b/gcc/config/gcn/gcn.opt
index bdc878f35ad..402deb625bd 100644
--- a/gcc/config/gcn/gcn.opt
+++ b/gcc/config/gcn/gcn.opt
@@ -65,7 +65,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