public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* Fwd: [openacc, committed] Add oacc_get_default_dim
       [not found] <e2ffbca3-f421-66f6-cca3-e906432ecb15@suse.de>
@ 2018-12-19 15:26 ` Tom de Vries
  2018-12-19 15:28   ` [openacc] Make oacc_fn_attrib_level external Tom de Vries
  2019-01-07  8:50   ` [openacc] Add oacc_get_min_dim Tom de Vries
  0 siblings, 2 replies; 3+ messages in thread
From: Tom de Vries @ 2018-12-19 15:26 UTC (permalink / raw)
  To: gcc-patches, Schwinge, Thomas

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

[ Adding gcc-patches ]

-------- Forwarded Message --------
Subject: [openacc, committed] Add oacc_get_default_dim
Date: Wed, 19 Dec 2018 16:24:25 +0100
From: Tom de Vries <tdevries@suse.de>
To: Thomas Schwinge <Thomas_Schwinge@mentor.com>

[ was: Re: [nvptx] vector length patch series -- openacc parts ]

On 19-12-18 11:40, Thomas Schwinge wrote:
> Hi Tom!
> 
> Thanks for picking up this series!
> 
> 
> And just to note:
> 
> On Tue, 18 Dec 2018 00:52:30 +0100, Tom de Vries <tdevries@suse.de> wrote:
>> On 14-12-18 20:58, Tom de Vries wrote:
>>
>>> 0003-openacc-Add-target-hook-TARGET_GOACC_ADJUST_PARALLEL.patch
>>
>>> 0017-nvptx-Enable-large-vectors.patch
>>
>>> 0023-nvptx-Force-vl32-if-calling-vector-partitionable-rou.patch
>>
>> Thomas,
>>
>> these patches are openacc (0003) or have openacc components (0017, 0023).
>>
>> Can you review and possibly approve the openacc parts?
> 
> I've seen this (and your earlier questions), and will get to it
> eventually, thanks.
> 
> 

In that case, let's make the review for the IMO trivial bits post-commit.

Committed the openacc component of 0017 ...

Thanks,
- Tom


[-- Attachment #2: 0001-openacc-Add-oacc_get_default_dim.patch --]
[-- Type: text/x-patch, Size: 1333 bytes --]

[openacc] Add oacc_get_default_dim

Expose oacc_default_dims to backends.

2018-12-17  Tom de Vries  <tdevries@suse.de>

	* omp-offload.c (oacc_get_default_dim): New function.
	* omp-offload.h (oacc_get_default_dim): Declare.

---
 gcc/omp-offload.c | 7 +++++++
 gcc/omp-offload.h | 2 ++
 2 files changed, 9 insertions(+)

diff --git a/gcc/omp-offload.c b/gcc/omp-offload.c
index 4457e1a3079..9c7bd7328d1 100644
--- a/gcc/omp-offload.c
+++ b/gcc/omp-offload.c
@@ -573,6 +573,13 @@ oacc_xform_tile (gcall *call)
 static int oacc_default_dims[GOMP_DIM_MAX];
 static int oacc_min_dims[GOMP_DIM_MAX];
 
+int
+oacc_get_default_dim (int dim)
+{
+  gcc_assert (0 <= dim && dim < GOMP_DIM_MAX);
+  return oacc_default_dims[dim];
+}
+
 /* Parse the default dimension parameter.  This is a set of
    :-separated optional compute dimensions.  Each specified dimension
    is a positive integer.  When device type support is added, it is
diff --git a/gcc/omp-offload.h b/gcc/omp-offload.h
index 6186f03649e..14edcad8a7d 100644
--- a/gcc/omp-offload.h
+++ b/gcc/omp-offload.h
@@ -22,6 +22,8 @@ along with GCC; see the file COPYING3.  If not see
 #ifndef GCC_OMP_DEVICE_H
 #define GCC_OMP_DEVICE_H
 
+extern int oacc_get_default_dim (int dim);
+
 extern GTY(()) vec<tree, va_gc> *offload_funcs;
 extern GTY(()) vec<tree, va_gc> *offload_vars;
 


^ permalink raw reply	[flat|nested] 3+ messages in thread

* [openacc] Make oacc_fn_attrib_level external
  2018-12-19 15:26 ` Fwd: [openacc, committed] Add oacc_get_default_dim Tom de Vries
@ 2018-12-19 15:28   ` Tom de Vries
  2019-01-07  8:50   ` [openacc] Add oacc_get_min_dim Tom de Vries
  1 sibling, 0 replies; 3+ messages in thread
From: Tom de Vries @ 2018-12-19 15:28 UTC (permalink / raw)
  To: gcc-patches, Schwinge, Thomas

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

[ was: Fwd: [openacc, committed] Add oacc_get_default_dim ]

On 19-12-18 16:27, Tom de Vries wrote:
> [ Adding gcc-patches ]
> 
> -------- Forwarded Message --------
> Subject: [openacc, committed] Add oacc_get_default_dim
> Date: Wed, 19 Dec 2018 16:24:25 +0100
> From: Tom de Vries <tdevries@suse.de>
> To: Thomas Schwinge <Thomas_Schwinge@mentor.com>
> 
> [ was: Re: [nvptx] vector length patch series -- openacc parts ]
> 
> On 19-12-18 11:40, Thomas Schwinge wrote:
>> Hi Tom!
>>
>> Thanks for picking up this series!
>>
>>
>> And just to note:
>>
>> On Tue, 18 Dec 2018 00:52:30 +0100, Tom de Vries <tdevries@suse.de> wrote:
>>> On 14-12-18 20:58, Tom de Vries wrote:
>>>
>>>> 0003-openacc-Add-target-hook-TARGET_GOACC_ADJUST_PARALLEL.patch
>>>
>>>> 0017-nvptx-Enable-large-vectors.patch
>>>
>>>> 0023-nvptx-Force-vl32-if-calling-vector-partitionable-rou.patch
>>>
>>> Thomas,
>>>
>>> these patches are openacc (0003) or have openacc components (0017, 0023).
>>>
>>> Can you review and possibly approve the openacc parts?
>>
>> I've seen this (and your earlier questions), and will get to it
>> eventually, thanks.
>>
>>
> 
> In that case, let's make the review for the IMO trivial bits post-commit.
> 
> Committed the openacc component of 0017 ...
> 

... and of 0023.

Thanks,
- Tom

[-- Attachment #2: 0002-openacc-Make-oacc_fn_attrib_level-external.patch --]
[-- Type: text/x-patch, Size: 1203 bytes --]

[openacc] Make oacc_fn_attrib_level external

Expose oacc_fn_attrib_level to be used in backends.

2018-12-17  Tom de Vries  <tdevries@suse.de>

	* omp-offload.c (oacc_fn_attrib_level): Remove static.
	* omp-offload.h (oacc_fn_attrib_level): Declare.

---
 gcc/omp-offload.c | 2 +-
 gcc/omp-offload.h | 1 +
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/gcc/omp-offload.c b/gcc/omp-offload.c
index 9c7bd7328d1..a220b4b9982 100644
--- a/gcc/omp-offload.c
+++ b/gcc/omp-offload.c
@@ -88,7 +88,7 @@ vec<tree, va_gc> *offload_funcs, *offload_vars;
 /* Return level at which oacc routine may spawn a partitioned loop, or
    -1 if it is not a routine (i.e. is an offload fn).  */
 
-static int
+int
 oacc_fn_attrib_level (tree attr)
 {
   tree pos = TREE_VALUE (attr);
diff --git a/gcc/omp-offload.h b/gcc/omp-offload.h
index 14edcad8a7d..176c4da7e88 100644
--- a/gcc/omp-offload.h
+++ b/gcc/omp-offload.h
@@ -23,6 +23,7 @@ along with GCC; see the file COPYING3.  If not see
 #define GCC_OMP_DEVICE_H
 
 extern int oacc_get_default_dim (int dim);
+extern int oacc_fn_attrib_level (tree attr);
 
 extern GTY(()) vec<tree, va_gc> *offload_funcs;
 extern GTY(()) vec<tree, va_gc> *offload_vars;

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [openacc] Add oacc_get_min_dim
  2018-12-19 15:26 ` Fwd: [openacc, committed] Add oacc_get_default_dim Tom de Vries
  2018-12-19 15:28   ` [openacc] Make oacc_fn_attrib_level external Tom de Vries
@ 2019-01-07  8:50   ` Tom de Vries
  1 sibling, 0 replies; 3+ messages in thread
From: Tom de Vries @ 2019-01-07  8:50 UTC (permalink / raw)
  To: gcc-patches, Schwinge, Thomas

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

[ was: Re: Fwd: [openacc, committed] Add oacc_get_default_dim ]

On 19-12-18 16:27, Tom de Vries wrote:
> [ Adding gcc-patches ]
> 
> -------- Forwarded Message --------
> Subject: [openacc, committed] Add oacc_get_default_dim
> Date: Wed, 19 Dec 2018 16:24:25 +0100
> From: Tom de Vries <tdevries@suse.de>
> To: Thomas Schwinge <Thomas_Schwinge@mentor.com>
> 
> [ was: Re: [nvptx] vector length patch series -- openacc parts ]
> 
> On 19-12-18 11:40, Thomas Schwinge wrote:
>> Hi Tom!
>>
>> Thanks for picking up this series!
>>
>>
>> And just to note:
>>
>> On Tue, 18 Dec 2018 00:52:30 +0100, Tom de Vries <tdevries@suse.de> wrote:
>>> On 14-12-18 20:58, Tom de Vries wrote:
>>>
>>>> 0003-openacc-Add-target-hook-TARGET_GOACC_ADJUST_PARALLEL.patch
>>>
>>>> 0017-nvptx-Enable-large-vectors.patch
>>>
>>>> 0023-nvptx-Force-vl32-if-calling-vector-partitionable-rou.patch
>>>
>>> Thomas,
>>>
>>> these patches are openacc (0003) or have openacc components (0017, 0023).
>>>
>>> Can you review and possibly approve the openacc parts?
>>
>> I've seen this (and your earlier questions), and will get to it
>> eventually, thanks.
>>
>>
> 
> In that case, let's make the review for the IMO trivial bits post-commit.
> 
> Committed the openacc component of 0017 ...
>


Likewise, added oacc_get_min_dim.

Thanks,
- Tom


[-- Attachment #2: 0001-openacc-Add-oacc_get_min_dim.patch --]
[-- Type: text/x-patch, Size: 1269 bytes --]

[openacc] Add oacc_get_min_dim

Expose oacc_min_dims to backends.

2019-01-07  Tom de Vries  <tdevries@suse.de>

	* omp-offload.c (oacc_get_min_dim): New function.
	* omp-offload.h (oacc_get_min_dim): Declare.

---
 gcc/omp-offload.c | 7 +++++++
 gcc/omp-offload.h | 1 +
 2 files changed, 8 insertions(+)

diff --git a/gcc/omp-offload.c b/gcc/omp-offload.c
index aade9f2dc60..9cac5655c63 100644
--- a/gcc/omp-offload.c
+++ b/gcc/omp-offload.c
@@ -580,6 +580,13 @@ oacc_get_default_dim (int dim)
   return oacc_default_dims[dim];
 }
 
+int
+oacc_get_min_dim (int dim)
+{
+  gcc_assert (0 <= dim && dim < GOMP_DIM_MAX);
+  return oacc_min_dims[dim];
+}
+
 /* Parse the default dimension parameter.  This is a set of
    :-separated optional compute dimensions.  Each specified dimension
    is a positive integer.  When device type support is added, it is
diff --git a/gcc/omp-offload.h b/gcc/omp-offload.h
index 6759a832d2b..21c9236b74f 100644
--- a/gcc/omp-offload.h
+++ b/gcc/omp-offload.h
@@ -23,6 +23,7 @@ along with GCC; see the file COPYING3.  If not see
 #define GCC_OMP_DEVICE_H
 
 extern int oacc_get_default_dim (int dim);
+extern int oacc_get_min_dim (int dim);
 extern int oacc_fn_attrib_level (tree attr);
 
 extern GTY(()) vec<tree, va_gc> *offload_funcs;

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2019-01-07  8:50 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <e2ffbca3-f421-66f6-cca3-e906432ecb15@suse.de>
2018-12-19 15:26 ` Fwd: [openacc, committed] Add oacc_get_default_dim Tom de Vries
2018-12-19 15:28   ` [openacc] Make oacc_fn_attrib_level external Tom de Vries
2019-01-07  8:50   ` [openacc] Add oacc_get_min_dim Tom de Vries

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).