public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Tom de Vries <tdevries@suse.de>
To: Cesar Philippidis <cesar@codesourcery.com>
Cc: "gcc-patches@gcc.gnu.org" <gcc-patches@gcc.gnu.org>,
	Jakub Jelinek <jakub@redhat.com>,
	Thomas Schwinge <thomas@codesourcery.com>
Subject: Re: [patch] adjust default nvptx launch geometry for OpenACC offloaded regions
Date: Mon, 30 Jul 2018 10:16:00 -0000	[thread overview]
Message-ID: <0f70a191-49b9-bb8c-6ca9-0956b1b1a46b@suse.de> (raw)
In-Reply-To: <5c0b9b2d-bbe3-dfd9-1ae5-a164a4079e0c@codesourcery.com>

[-- Attachment #1: Type: text/plain, Size: 466 bytes --]

On 07/11/2018 09:13 PM, Cesar Philippidis wrote:
> 2018-07-XX  Cesar Philippidis  <cesar@codesourcery.com>
> 	    Tom de Vries  <tdevries@suse.de>
> 
> 	gcc/
> 	* config/nvptx/nvptx.c (PTX_GANG_DEFAULT): Rename to ...
> 	(PTX_DEFAULT_RUNTIME_DIM): ... this.
> 	(nvptx_goacc_validate_dims): Set default worker and gang dims to
> 	PTX_DEFAULT_RUNTIME_DIM.
> 	(nvptx_dim_limit): Ignore GOMP_DIM_WORKER;

That's an independent patch.

Committed at below.

Thanks,
- Tom

[-- Attachment #2: 0001-nvptx-offloading-Determine-default-workers-at-runtime.patch --]
[-- Type: text/x-patch, Size: 1911 bytes --]

[nvptx, offloading] Determine default workers at runtime

Currently, if the user doesn't specify the number of workers for an openacc
region, the compiler hardcodes it to a default value.

This patch removes this functionality, such that the libgomp runtime can decide
on a default value.

2018-07-27  Cesar Philippidis  <cesar@codesourcery.com>
	    Tom de Vries  <tdevries@suse.de>

	* config/nvptx/nvptx.c (PTX_GANG_DEFAULT): Rename to ...
	(PTX_DEFAULT_RUNTIME_DIM): ... this.
	(nvptx_goacc_validate_dims): Set default worker and gang dims to
	PTX_DEFAULT_RUNTIME_DIM.
	(nvptx_dim_limit): Ignore GOMP_DIM_WORKER.

---
 gcc/config/nvptx/nvptx.c | 9 +++------
 1 file changed, 3 insertions(+), 6 deletions(-)

diff --git a/gcc/config/nvptx/nvptx.c b/gcc/config/nvptx/nvptx.c
index 5608bee8a8d..c1946e75f42 100644
--- a/gcc/config/nvptx/nvptx.c
+++ b/gcc/config/nvptx/nvptx.c
@@ -5165,7 +5165,7 @@ nvptx_expand_builtin (tree exp, rtx target, rtx ARG_UNUSED (subtarget),
 /* Define dimension sizes for known hardware.  */
 #define PTX_VECTOR_LENGTH 32
 #define PTX_WORKER_LENGTH 32
-#define PTX_GANG_DEFAULT  0 /* Defer to runtime.  */
+#define PTX_DEFAULT_RUNTIME_DIM 0 /* Defer to runtime.  */
 
 /* Implement TARGET_SIMT_VF target hook: number of threads in a warp.  */
 
@@ -5214,9 +5214,9 @@ nvptx_goacc_validate_dims (tree decl, int dims[], int fn_level)
     {
       dims[GOMP_DIM_VECTOR] = PTX_VECTOR_LENGTH;
       if (dims[GOMP_DIM_WORKER] < 0)
-	dims[GOMP_DIM_WORKER] = PTX_WORKER_LENGTH;
+	dims[GOMP_DIM_WORKER] = PTX_DEFAULT_RUNTIME_DIM;
       if (dims[GOMP_DIM_GANG] < 0)
-	dims[GOMP_DIM_GANG] = PTX_GANG_DEFAULT;
+	dims[GOMP_DIM_GANG] = PTX_DEFAULT_RUNTIME_DIM;
       changed = true;
     }
 
@@ -5230,9 +5230,6 @@ nvptx_dim_limit (int axis)
 {
   switch (axis)
     {
-    case GOMP_DIM_WORKER:
-      return PTX_WORKER_LENGTH;
-
     case GOMP_DIM_VECTOR:
       return PTX_VECTOR_LENGTH;
 

  parent reply	other threads:[~2018-07-30 10:16 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-06-20 21:59 Cesar Philippidis
2018-06-20 22:16 ` Tom de Vries
2018-06-21 13:58   ` Cesar Philippidis
2018-07-02 14:14     ` Tom de Vries
2018-07-02 14:39       ` Cesar Philippidis
2018-07-11 19:13       ` Cesar Philippidis
2018-07-26 11:58         ` Tom de Vries
2018-07-26 12:13         ` [libgomp, nvptx] Move device property sampling from nvptx_exec to nvptx_open Tom de Vries
2018-07-26 12:45         ` [patch] adjust default nvptx launch geometry for OpenACC offloaded regions Tom de Vries
2018-07-26 14:27         ` Cesar Philippidis
2018-07-26 15:18           ` Tom de Vries
2018-07-30 10:16         ` Tom de Vries [this message]
2018-06-29 17:16 ` Cesar Philippidis
2018-06-30 11:36   ` Cesar Philippidis

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=0f70a191-49b9-bb8c-6ca9-0956b1b1a46b@suse.de \
    --to=tdevries@suse.de \
    --cc=cesar@codesourcery.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=jakub@redhat.com \
    --cc=thomas@codesourcery.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).